Skip to content

fix(service): use start-whisper-server.sh in whisper start fallback#283

Open
codesmax wants to merge 1 commit intombailey:masterfrom
codesmax:fix/whisper-start-use-wrapper-script
Open

fix(service): use start-whisper-server.sh in whisper start fallback#283
codesmax wants to merge 1 commit intombailey:masterfrom
codesmax:fix/whisper-start-use-wrapper-script

Conversation

@codesmax
Copy link
Copy Markdown

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 whisper executes fallback logic to invoke the whisper-server binary directly. This omits important config + flags set in the start-whisper-server.sh wrapper that's aligned with the voicemode service:

  • --inference-path /v1/audio/transcriptions
  • --convert
  • --threads

Notably the missing --inference-path flag causes whisper-server to serve at the default /inference path. 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 test succeeds => 1013 passed, 60 skipped in 61.93s (0:01:01)
  • (on fix branch) uv run voicemode service start whisper => verified wrapper execution with correct flags set; voicemode converse with local whisper works

Side note: thanks for building such a sweet tool! 🙏

Copy link
Copy Markdown
Collaborator

@ai-cora ai-cora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_vars is computed before the if 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 via nproc/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.
@codesmax codesmax force-pushed the fix/whisper-start-use-wrapper-script branch from 49dbfbd to 3b1fb41 Compare March 11, 2026 18:36
@codesmax
Copy link
Copy Markdown
Author

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).

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