feat(conductor): add opt-in voice STT to Telegram bridge#309
Open
Abeansits wants to merge 3 commits intoasheshgoplani:mainfrom
Open
feat(conductor): add opt-in voice STT to Telegram bridge#309Abeansits wants to merge 3 commits intoasheshgoplani:mainfrom
Abeansits wants to merge 3 commits intoasheshgoplani:mainfrom
Conversation
Replace Groq Whisper API with local parakeet-mlx (parakeet-tdt-0.6b-v3) for voice message transcription. Add TTS voice replies using macOS say + ffmpeg (OGG/Opus output), toggled via BRIDGE_TTS_ENABLED env var. - stt_worker.py: standalone subprocess worker that normalizes audio to mono 16kHz WAV and runs parakeet-mlx inference, crash-isolated from the bot event loop - bridge.py: transcribe_voice() calls stt_worker via async subprocess (60s timeout), generate_voice_reply() chains say + ffmpeg via async subprocesses with per-step timeouts and proper kill/cleanup Co-Authored-By: Claude Opus 4.6 <[email protected]>
Switch from importing parakeet-mlx as a Python library to invoking the parakeet-mlx CLI binary. This avoids import/dependency issues and is cleaner for subprocess-based isolation. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Strip generate_voice_reply(), BRIDGE_TTS_ENABLED/BRIDGE_TTS_VOICE config, bot.send_voice() TTS response block, say+ffmpeg pipeline, and FSInputFile import. Voice-to-text (STT) remains intact. Co-Authored-By: Claude Opus 4.6 <[email protected]>
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.
Summary
stt_worker.py), crash-isolated from the bot event loop. No cloud API needed.BRIDGE_STT_ENABLED=trueenv var is set. Without it, voice messages are silently ignored.stt_worker.pyusesshutil.which('parakeet-mlx')to find the CLI on PATH, withPARAKEET_CLI_PATHenv var as an explicit override.~/.agent-deck/conductor/bridge.login addition to stdout.Changes
conductor/bridge.py:transcribe_voice()downloads voice files and calls stt_worker via async subprocess (60s timeout).handle_message()now handlesmessage.voicewhenBRIDGE_STT_ENABLED=true.conductor/stt_worker.py: New standalone STT worker that finds and invokes theparakeet-mlxCLI, reads output text files, and prints transcription to stdout.Configuration
Test plan
BRIDGE_STT_ENABLED=true, send a voice message via Telegram and verify transcriptionTranscribing...status then the transcribed text is forwarded to the conductor[Could not transcribe voice message.]