feat: add voice interaction and harden chat security - #8
Open
CodewithJha wants to merge 4 commits into
Open
CodewithJha wants to merge 4 commits into
CodewithJha wants to merge 4 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Overview
Adds voice interaction to Nawab with STT/TTS support, voice-mode WebSocket integration, frontend voice UX, and security hardening for the affected authentication and WebSocket paths.
This is intentionally a single PR organized into four logical commits so each part can be reviewed independently.
Architecture
Voice input:
VoiceRecorder
→ Frontend BFF
→
/api/v1/voice/transcribe→ Groq Whisper
→ text
→ WebSocket agent
→ response
→ TTS queue
→ Kokoro
→ audio playback
Voice output uses Kokoro with
hm_psias the default voice and1.05speech speed.Commits / Recommended Review Order
1. Voice foundation
feat: add STT/TTS providers and voice REST APIAdds:
2. Voice integration + frontend
feat: wire voice mode through streaming and add voice UIAdds:
voice_modeWebSocket integration3. Security hardening
security: harden auth, ownership, and WebSocket limitsHardens:
4. Documentation + configuration
docs: document voice setup and configurationAdds:
Validation
Backend
pytest -qFrontend
Live verification
:9000verified:3000verifiedSecurity
No real secrets or local environment files are included in the PR.
Notes
Manual Safari subjective audio verification was limited by the available browser automation environment. API, WebSocket, and frontend automated voice paths were verified successfully.
TTS currently uses
hm_psi. English-word pronunciation can be improved separately without changing the current voice architecture.Review Guidance
Please review the four commits in order:
This order follows the dependency flow and should make the overall change easier to review.
Made with Cursor