8000 fix(transcribe): keep the language Whisper heard by adeelahmad · Pull Request #592 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

fix(transcribe): keep the language Whisper heard - #592

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-xfmkzn
Oct 18, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-xfmkzn

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: with no language set in Settings › Transcription, recordings Whisper transcribed were saved with no language, though Whisper had detected one. Other engines kept theirs, so search's language filter and the text cleanup skipped Whisper's recordings.

After: Whisper (faster-whisper and MLX) keeps the language it heard on every segment; a language set in Settings still wins.

How: Whisper.transcribe in domain/ingest.py reads the detected language from faster-whisper's info or MLX's result.

Motivation and Context

Found while building custom vocabulary (#583) from the personal feature plan sheet.

Screenshots (if appropriate):

n/a

Steps to reproduce (if appropriate):

n/a

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md. Written as changelog.d/whisper-lang.md, per build(release): changelog fragments in changelog.d/ instead of one Unreleased section #581.

Done questions (AGENTS.md)

  • Goal: delivers what the user wanted, merged on green CI.
  • Agents: usable through the API, MCP or an assistant tool. Transcripts agents read now carry their language.
  • Zero setup: no new prerequisite, .env edit or manual step.
  • Fewest clicks and keystrokes. n/a: no UI.
  • Configurable: new settings in the web app with defaults; wizard asks only what is required. n/a: no new setting; the existing language setting still wins.
  • Light: default install still runs on a Raspberry Pi with cloud models.
  • Private and secure: data local and encrypted, passkeys, threat model updated. n/a: no new surface.
  • Cost: cheapest path, model calls in the activity ledger, budgets respected. n/a: no model calls added.
  • User decides: consequential or new actions wait for the user; defaults unchanged.
  • Upgrades: existing installs upgrade safely (upgrade step for stored-data changes). n/a: no stored-data change; new recordings only.
  • Honest: sources cited; labelled built, in progress or planned.
  • Tests, docs and generated files updated. test_speech.py covers both Whisper backends.
  • Open standards; dependencies keep Lens MIT. n/a: no dependencies.
  • Result reported with evidence; "refine later" items written down.
  • Reuse: existing Lens code and permissive libraries reused, nothing reinvented.

Local CI (ci/local-ci.sh): FastAPI (embedded and server), pre-commit and PR title passed.


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QFUNzy1QZy5HhKAyJxTAYJ
@adeelahmad adeelahmad self-assigned this Oct 18, 2026
@adeelahmad
adeelahmad merged commit 794ee36 into main Oct 18, 2026
11 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-xfmkzn branch October 18, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0