feat: add audio buffering and interruption handling for voice input

Implement processing phase tracking (idle/transcribing/llm) and audio segment buffering to handle speech interruptions gracefully. Adds abort_request message type and buffer timeout mechanism to process accumulated audio segments together.
```
This commit is contained in:
Mohamed Boudra
2025-10-20 13:12:55 +02:00
parent 13b5fab456
commit 845cfca6eb
4 changed files with 220 additions and 29 deletions
+6
View File
@@ -435,6 +435,12 @@ function App() {
audioPlayerRef.current.stop();
setIsPlayingAudio(false);
setCurrentAssistantMessage("");
// Send abort request to server immediately
ws.send({
type: "abort_request",
payload: {},
});
},
onSpeechEnd: async (audioData: Float32Array) => {
console.log("[App] Speech ended, processing...");