feat(stt): pass conversation context as Whisper initial_prompt to reduce mishearings

This commit is contained in:
2026-04-07 08:48:27 -04:00
parent d3170e5545
commit d290bebad2
4 changed files with 18 additions and 6 deletions
+2 -1
View File
@@ -102,7 +102,8 @@ async function stopPtt() {
let transcript: string
try {
const result = await transcribeAudio(blob)
const lastAssistant = [...messages.value].reverse().find(m => m.role === 'assistant')?.content
const result = await transcribeAudio(blob, lastAssistant)
transcript = result.transcript.trim()
} catch {
phase.value = 'error'