fix(voice_worker): the wake word hint may never add, drop or create a wake word
Hotword occurrences were counted with fuzzy matching, which never counted a one-letter wake word (so a hinted "봇 ..." was accepted over a plain decode without it) and counted the real word "서비스" as "자비스" (so the hint could turn it into the wake word). Occurrences are now counted exactly (case, spacing and punctuation ignored); near misses are left as heard for call detection. The real-noise eval now plays each recording as recorded and at -25 dBFS and reports how many clips reached the model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -134,16 +134,19 @@ text is empty:
|
||||
- Its compression ratio (UTF-8 bytes over zlib bytes) is at most 2.4, which catches repetition loops.
|
||||
- With hotwords: the clip is decoded once with them and once without, from the same encoder pass.
|
||||
The plain decode must pass the checks above, otherwise nothing was said. The hinted text is used
|
||||
only when it stays within half the plain text's letters of it and mentions every hotword as often
|
||||
as the plain one (a near miss in spelling counts as a mention), so the hint can fix how a spoken
|
||||
wake word is written but never add or drop one. Otherwise the plain text is used.
|
||||
only when it stays within half the plain text's letters of it and contains every hotword exactly
|
||||
as often as the plain one (ignoring case, spacing and punctuation, no fuzzy matching), so the hint
|
||||
can never add, drop or create a wake word: not from laughter, not after a real sentence, not from
|
||||
a one-letter wake word, and not by turning a similar word ("서비스", or the near miss "자비수")
|
||||
into it. Otherwise the plain text is used; matching near misses is left to call detection.
|
||||
|
||||
`no_speech_prob` is not used: large-v3-turbo reports 0.0 for silence and noise alike.
|
||||
|
||||
Measured (2026-11-11, RTX 5050) with 54 real noise recordings from ESC-50 (typing, mouse, breathing,
|
||||
coughing, laughing, crying, vacuum, ...), each at its own level and at -25 dBFS: of the 108 noise-only
|
||||
clips, 102 never reached the model (the VAD rule above) and the 6 that did (coughs, laughter, crying)
|
||||
all came out empty, with and without the wake word hint. Over 89 mixes of speech with that noise
|
||||
clips streamed through the worker with the wake word hint on, 103 never reached the model (the VAD
|
||||
rule above) and the 5 that did (coughs, laughter, crying) all came out empty
|
||||
(`test_real_noise_recordings_produce_no_text` with `JARVIS_NOISE_DIR`). Over 89 mixes of speech with that noise
|
||||
(SNR 20, 10 and 0 dB, plus clean) the mean character error rate was 4.8%. Left over: one
|
||||
"thank you" written for laughter just before a sentence (mean log-probability -0.70, right at the
|
||||
line), two short words lost in loud noise, and one word repeated three times at SNR 0. A stricter
|
||||
|
||||
Reference in New Issue
Block a user