Added comprehensive debug logging to identify why audio playback ends without starting:
- TTS text processing and buffer management
- Audio chunk generation and transfer between buffers
- TTS task queue management
- Streaming text processing
This will help identify if the issue is:
1. Empty text being sent to TTS
2. TTS generation failing
3. Audio data not being transferred between buffers
4. Premature completion detection
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
The issue was that audio chunks were getting stuck in the preload_buffer
because the system required 3 chunks before starting playback. When TTS
generated fewer than 3 chunks, they would never be transferred to the
playback buffer, causing playback to end without ever starting.
This fix reduces the preload_size requirement from 3 to 1, allowing
even a single audio chunk to start playing.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>