1. Buffer 200ms → 500ms — lebih banyak data di-buffer sebelum playback dimulai, mengurangi dampak network jitter dan memberikan Web Audio API lebih banyak headroom untuk render audio tanpa glitch
2. flush() setelah stream selesai — fix bug di mana audio pendek (total < 500ms) tidak pernah diputar karena threshold tidak pernah tercapai; flush() memaksa semua pending buffers di-schedule setelah stream berakhir
- AudioPlayer: buffer chunks before threshold so first ~200ms of audio
is not lost; add onStarted callback so callers know when playback begins
- Main: trigger SPEAKING state when audio actually starts playing (not
before TTS API call), collect PCM chunks and store in message.audioChunks
for instant replay without re-requesting TTS
- Main: save audioText from SSE stream into message state after loadRoomMessages
so speaker button uses the TTS-optimized text instead of empty string
- types: make audioText optional since server-loaded history messages
don't carry this field
- FeedbackWidget: fallback to content when audioText is empty, enabling
speaker button to work on history messages and text-mode responses
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>