fix(voice): cancel-safe IPC reads, show transcript, robust mic formats - #20
Merged
Conversation
- ipc: persistent read buffer so select!-cancelled reads don't drop or corrupt runtime messages (the main 'not working' cause at 30 FPS). - client: render the runtime's echoed user text (typed or voice transcript) as the user's turn, de-duped against local prompts. - audio: accept all cpal input sample formats, not just I16/F32. - runtime: skip empty/hallucinated voice transcripts. - ui: show voice keybindings (v talk, s stop).
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.
Closes #18
Summary
End-to-end voice pipeline: the Rust client owns all audio (capture, playback,
TTS); the Python runtime transcribes and drives the existing chat pipeline.
Client (Rust)
cpal, all sample formats) → 16-bit WAV (hound).vto start/stop; recording shown asRECORDINGin the status bar.voice_end, sends the recorded file path over IPC.spd-say);sinterrupts.against typed prompts).
Runtime (Python)
VOICE_ENDcarries the recorded path; the bridge transcribes it (Groq Whisper)and publishes
ChatPipelineStartEvent→ same pipeline as a typed prompt.Notable fixes
select!loop cancelled reads everyframe; a persistent read buffer prevents dropped/corrupted runtime messages.
Verification
pytest65 passing, ruff clean.cargo build/clippy/fmtclean,cargo testpassing.libasound2-devfor thecpalbuild.Running it (reviewer notes)
speech-dispatcherinstalled for TTS, and Qdrant/Neo4j (docker compose up -d).