fix: stop TTS playback when PTT is activated

Pressing push-to-talk now immediately stops any ongoing TTS audio before
opening the microphone, preventing the assistant from hearing itself.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-30 19:43:15 -04:00
parent 1460863e82
commit 76c3dbc4b7
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -281,6 +281,7 @@ async function speakText(text: string) {
// PTT: hold to record, release to transcribe and send
async function startPtt() {
if (!voiceEnabled.value || recorder.recording.value) return
audio.stop()
await recorder.startRecording()
}