fix(tts): play Opus chunks immediately as they arrive instead of buffering until speaking_end
This makes the voice start playing the first words while the rest of the response is still generating (big win for perceived latency). Per PLAN item 2.
This commit is contained in:
@@ -141,7 +141,7 @@ export function useConversation() {
|
||||
combined.set(chunk, offset);
|
||||
offset += chunk.length;
|
||||
}
|
||||
audioBufferRef.current = [];
|
||||
// audioBufferRef no longer used for playback (incremental)
|
||||
const blob = new Blob([combined], { type: 'audio/ogg' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
audioRef.current.src = url;
|
||||
|
||||
Reference in New Issue
Block a user