feat: implement STT and TTS foundation using Expo libraries#1
Conversation
There was a problem hiding this comment.
Pull request overview
Implements an initial Speech-to-Text (STT) and Text-to-Speech (TTS) foundation for the app using Expo libraries, wiring speech prompts and voice capture into onboarding and the home chat flow.
Changes:
- Added TTS/STT service wrappers and hooks (
useTTS,useSTT) backed byexpo-speechandexpo-speech-recognition. - Integrated speech behaviors into
OnboardingScreen(welcome + mic prompt + transcript-to-answer) andHomeScreen(mic prompt + transcript-to-message + auto TTS reply). - Updated project config: Android permissions, new dependencies, and a
postinstallscript to patch module tsconfigs.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| test.md | Added a planning/architecture doc for speech structure and phases. |
| src/services/speech/tts.ts | Implements Expo Speech wrapper with initialization/logging and speech control. |
| src/services/speech/stt.ts | Implements Expo speech-recognition wrapper with permission handling and event listeners. |
| src/hooks/useTTS.ts | Hook to initialize and expose speak/stop APIs. |
| src/hooks/useSTT.ts | Hook to manage listening state and transcript updates via STT service. |
| src/screens/OnboardingScreen.tsx | Adds welcome TTS, mic-driven STT, and transcript display/answer updates. |
| src/screens/HomeScreen.tsx | Adds mic-driven STT, auto-send from transcript, and auto TTS assistant reply. |
| src/constants/voice.ts | Introduces shared TTS voice configuration. |
| scripts/postinstall-fixes.js | Adds install-time patching of dependency tsconfig files. |
| package.json | Adds speech deps + postinstall script + related tooling deps. |
| app.json | Adds Android permissions required/used by speech features. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Debashich/Clara/sessions/629175aa-9816-4f8e-ace0-0dd8136fcee7 Co-authored-by: Debashich <178707367+Debashich@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Debashich/Clara/sessions/936fe6bb-a770-4abd-811b-1122efa4c127 Co-authored-by: Debashich <178707367+Debashich@users.noreply.github.com>
|
@copilot verify all updates |
Verified all implemented updates on
|

Basic Testing Checklist
Mic Button Behavior
Expected Console Logs
[TTS] Initializing TTS engine...
[TTS] Speaking: Welcome to Clara
[TTS] Speech started
[STT] Checking microphone permission...
[STT] Starting voice recognition...
[STT] Transcript captured: [user speech]
[TTS] Speech completed