1 Commits

Author SHA1 Message Date
81a0c59060 Fix Android voice bug - STT restart after TTS
PROBLEM:
startListening() triggers spurious AppState change to "background" on Android,
causing voice session to stop immediately after Julia responds.

ROOT CAUSE:
React Native AppState bug - requesting audio focus triggers false background event.

SOLUTION:
- Added sttStartingIgnoreAppStateRef flag
- Ignore AppState changes for 200ms after startListening() call
- Protects against false session termination during STT initialization

CHANGES:
- app/(tabs)/_layout.tsx: Added Android workaround with 200ms protection window
- VOICE_DEBUG_GUIDE.md: Documented bug, workaround, and expected logs

RESULT:
Voice session now continues correctly after Julia's response on Android.
STT successfully restarts and user can speak again without manual restart.
2026-01-29 09:41:16 -08:00