tts-voice-creator-clone-and.../static/js
mARTin-B78 13c79768b4 Fix speech gate, hallucination filter, and latency
Speech gate (silence detection):
- vadHadSpeech flag: VAD auto-stop cancels without calling STT when no
  speech was detected (fixes "[STT] No speech detected → gibberish" loop)
- cancelNextBlob flag: onstop skips processBlob when VAD cancels silently
- vadLastVoiceMs: gates preview transcription on actual detected speech
  (prevents "reich" hallucination on initial silence chunks)

Hallucination filter:
- Client: HALLUCINATION_RE strips known Whisper phantoms from preview
- Server: _is_hallucination() in generate() treats "reich" / "danke" /
  "thank you" etc. as "No speech detected" → never reaches LLM

Latency:
- VAD_SILENCE_MS: 1500 → 1000 ms (sends 500 ms sooner per turn)
- VAD_MIN_REC_MS: 500 → 400 ms
- MediaRecorder timeslice: 2500 → 1500 ms (preview text updates faster)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 20:38:53 +02:00
..
ai-backends.js Persist engine container names and card URLs to server settings 2026-05-29 15:17:02 +02:00
benchmark.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
conversation.js Fix speech gate, hallucination filter, and latency 2026-05-29 20:38:53 +02:00
engines.js Persist engine container names and card URLs to server settings 2026-05-29 15:17:02 +02:00
generation.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
init.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
integrations.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
routing.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
settings.js Persist engine container names and card URLs to server settings 2026-05-29 15:17:02 +02:00
stt.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
tts-preview.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
utils.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
voice-clone.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
voice-inspector.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
voice-library.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
voice-sources.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00