Repository navigation
feat(desktop): voice input in the desktop app without Docker - #769
Merged
Merged
Conversation
…per model The desktop binary has no Whisper sidecar, so voice input and live streaming returned WHISPER_UNAVAILABLE there and /health was always degraded. - app/services/whisper_local.py: faster-whisper engine with the small.en model bundled in the binary, plus a streaming buffer that commits settled segments so long memos stay fast - WHISPER_LOCAL (default on in desktop mode) routes call_whisper_asr, the availability check, /health and /ws/transcribe to the local engine; Docker keeps using the sidecar - scripts/fetch_whisper_model.py + spec/workflow changes to bundle the model - desktop.py: multiprocessing.freeze_support(), otherwise the engine's helper process boots a second copy of the API in the frozen binary
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Voice doesn't work in the v1.1.1 desktop app. The desktop binary has no Whisper service, so the live stream closes with
WHISPER_UNAVAILABLE, uploads return 503STT_UNAVAILABLE, and/healthreportsdegradedon every launch.This PR makes the desktop backend transcribe in-process with
faster-whisper, using a model shipped inside the binary. Docker is unchanged and keeps using the Whisper sidecar.Fixes #768
What changed
app/services/whisper_local.py(new): the engine, audio decoding, and a streaming buffer for live recordingsWHISPER_LOCALsetting, on by default whenFIREFORM_DESKTOP=trueand off in Docker. When it is on, uploads, the availability check,/healthand/ws/transcribeuse the local enginescripts/fetch_whisper_model.py,fireform-backend.specandbuild-desktop-binaries.yml: download the model and bundle it in the binaryapp/desktop.py:multiprocessing.freeze_support(). Without it, the first transcription made the packaged binary start a second copy of the APIdocs/DESKTOP.mdupdatedChoices worth reviewing
small, nottiny. I triedtinyfirst. It turned "410 Oak Street" into "410 OX 3" and "Captain Ruiz" into "Captain Rui S.".smallgot both right, and addresses and names are what a report needs.Costs and limits
Type of change
How Has This Been Tested?
pytest tests/: 474 passed (11 new, using a fake model so nothing is downloaded)ruff check app tests scriptsHF_HUB_OFFLINE=1:POST /api/v1/input/voicetranscribed wav, m4a and webm/api/v1/ws/transcribewith a 53 s recording sent at real-time speed: 24 interim updates, final transcript 2.8 s after stop/healthishealthy, live stream worksTo reproduce:
Test Configuration:
Checklist: