fix(voice): allow WASM compilation in CSP for Silero VAD
Add 'wasm-unsafe-eval' to script-src and blob: to worker-src in Content-Security-Policy header. Required by onnxruntime-web to compile the Silero VAD ONNX model. Also surface VAD init errors as a toast instead of silent console log. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -153,10 +153,11 @@ const vad = useVad({
|
||||
void stopRecording(false)
|
||||
},
|
||||
onNoSpeech: () => {
|
||||
// User manually stopped without VAD detecting speech. Toast it; the
|
||||
// stopRecording path below will skip Whisper based on vadSawSpeech.
|
||||
useToastStore().show('No speech detected', 'warning')
|
||||
},
|
||||
onVadError: (msg) => {
|
||||
useToastStore().show(`VAD failed: ${msg}`, 'error')
|
||||
},
|
||||
})
|
||||
|
||||
// Live mic halo. A solid red disc sits behind the mic button and scales
|
||||
|
||||
Reference in New Issue
Block a user