docs(design): tts playback design doc (phase 2)#106
docs(design): tts playback design doc (phase 2)#106dimakis merged 2 commits intofeat/voice-stt-batchfrom
Conversation
Covers: useVoice TTS extension, text chunking with pipelining, AudioContext playback, VoiceSettings component, ChatView auto-speak on message_end, interruption rules, voice selection, and error handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Design ReviewIssues to address before implementationAudioContext reuse — The playback code sample creates AbortController on
Suggestions (non-blocking)
What looks good
|
- AudioContext reuse: singleton with lazy creation and cleanup - AbortController on synthesize() for cancellable fetches - Track messageId instead of messages.length for TTS trigger - Simplify to sequential playback for MVP (no pipelining) - Lazy voice list fetch (on first TTS enable, not mount) - Dynamic default voice from /v1/voices response Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs(design): tts playback design doc (phase 2) Covers: useVoice TTS extension, text chunking with pipelining, AudioContext playback, VoiceSettings component, ChatView auto-speak on message_end, interruption rules, voice selection, and error handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs(design): address review feedback on tts design - AudioContext reuse: singleton with lazy creation and cleanup - AbortController on synthesize() for cancellable fetches - Track messageId instead of messages.length for TTS trigger - Simplify to sequential playback for MVP (no pipelining) - Lazy voice list fetch (on first TTS enable, not mount) - Dynamic default voice from /v1/voices response Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
useVoicehook withspeak(),stopSpeaking(), voice selection, and TTS togglelib/tts.tsfor text chunking (sentence-aware, pipelined synthesis) and AudioContext playbackVoiceSettings.tsxcomponent for speaker toggle + voice pickerMESSAGE_ENDwhen TTS is enabledNo implementation code — design review only. Depends on #105 (Phase 1 batch STT).
Review focus
<audio>element tradeoff🤖 Generated with Claude Code