fix(service): use start-whisper-server.sh in whisper start fallback#283
fix(service): use start-whisper-server.sh in whisper start fallback#283codesmax wants to merge 1 commit intombailey:masterfrom
Conversation
ai-cora
left a comment
There was a problem hiding this comment.
Great bug fix — nice root cause analysis and clean minimal diff. The two-tier approach (prefer wrapper script, fall back to direct binary with correct flags) is exactly right.
Minor observations (non-blocking):
config_varsis computed before theif service_name == "whisper"block so it also runs for kokoro/voicemode/connect fallback paths where it's unused. Could be scoped inside the whisper block, but harmless as-is.- The direct binary fallback doesn't include
--threads(the wrapper auto-detects vianproc/sysctl). Not a regression since the original didn't have it either, but worth noting for completeness.
Architectural note for us (not on you!): We spotted that this whole fallback path exists because uninstall_service() deletes the plist/systemd unit file rather than disabling it. Both launchd and systemd support disable-without-delete, which would let service start always route through the service manager → start script. We'll track that cleanup separately. Your fix is the right thing for now.
Thanks for the contribution and the kind words! 🙏
Current start_service() fallback logic for whisper is triggered if auto-start via launchd/systemd is disabled, invoking whisper-server binary directly. Existing code omits --inference-path + other flags set in start-whisper-server.sh. Result is failed local STT requests to the default /inference path. Fix is to invoke the wrapper script when available and fall back to direct binary execution with correct arguments.
49dbfbd to
3b1fb41
Compare
|
Saw that the merge was blocked since the commit in my PR wasn't signed. Sorry about that. I just updated the branch with a signed commit (with no changes otherwise). |
Summary
Installation of voicemode with local whisper enables auto-start by default. If disabled, it removes launchd/systemd service files, such that
voicemode service start whisperexecutes fallback logic to invoke thewhisper-serverbinary directly. This omits important config + flags set in thestart-whisper-server.shwrapper that's aligned with the voicemode service:--inference-path /v1/audio/transcriptions--convert--threadsNotably the missing
--inference-pathflag causes whisper-server to serve at the default/inferencepath. This results in a 404 when voicemode attempts STT via the expected OpenAI-compatible endpoint:STT failed for http://127.0.0.1:2022/v1 (whisper): File Not Found (/v1/audio/transcriptions).Fix is to invoke the wrapper script when available, and fall back to direct binary execution but with necessary missing arguments.
Test Plan
make testsucceeds =>1013 passed, 60 skipped in 61.93s (0:01:01)uv run voicemode service start whisper=> verified wrapper execution with correct flags set; voicemode converse with local whisper worksSide note: thanks for building such a sweet tool! 🙏