feat: 转写支持静音段幻觉抑制参数(HST)
无 VAD 的 decode_full 会在无语音段"编"出字幕(`こんにちは`/`おはようございます`/ `東京都交通局8800形電車`)。实测这类幻觉与"呻吟间隙里的真实短台词"在 `no_speech_prob`、`avg_logprob`、silero VAD 与音频能量四个维度上都不可分, 只能用 faster-whisper 自带的 `hallucination_silence_threshold`(HST)抑制: 怀疑幻觉时跳过超过阈值的静音部分(需 `word_timestamps=True`)。 - `nodes/whisper.py` 透传 `word_timestamps` / `hallucination_silence_threshold` / `no_speech_threshold` / `log_prob_threshold` / `compression_ratio_threshold`, 未配置的键不传,保持 faster-whisper 默认值与改造前行为。 - `learn-translate` 默认 HST=2.0 + word_timestamps:同一片头 120 秒无对话段由 15 条 字幕降到 4 条且无套话幻觉残留,呻吟段基本保留;代价转写约慢 1.8×。 - 实测数据与取舍记录见 docs/workflows.md#decode_full-与幻觉呻吟清洗。
This commit is contained in:
@@ -45,6 +45,18 @@ Expecting value: line 1 column 1 (char 0)`),也会直接渲染成超长字
|
||||
展示时长 ≥15s 且同一 1–6 字单元连续重复 ≥6 次且覆盖正文 ≥70%;真实短促呻吟
|
||||
(`ぇ`×15、`ああああああ`)靠时长区分,零误删。VAD 开关都会生效。
|
||||
|
||||
**静音段幻觉抑制**(2026-09):decode_full 的固有副作用是"无语音段照样写字幕"——
|
||||
whisper 会在静音/音乐段输出 `こんにちは`、`おはようございます`、`東京都交通局8800形電車`
|
||||
这类短幻觉。实测这类幻觉与"呻吟间隙里的真实短台词"在 `no_speech_prob`、`avg_logprob`、
|
||||
silero VAD 与音频能量四个维度上**都不可分**(数据见 `data/experiments/regen_plan/REPORT.md`),
|
||||
所以走 faster-whisper 自带的 `hallucination_silence_threshold`(HST,需
|
||||
`word_timestamps=True`):怀疑该段是幻觉时,跳过超过阈值的静音部分。learn-translate
|
||||
默认 `hallucination_silence_threshold=2.0` + `word_timestamps=true`:同一片头 120 秒
|
||||
无对话段由 15 条字幕降到 4 条(无套话幻觉残留),呻吟段基本保留;代价是转写约慢 1.8×。
|
||||
参数由工作流直接传给节点(`_guard_transcribe_params` 透传 `word_timestamps` /
|
||||
`hallucination_silence_threshold` / `no_speech_threshold` / `log_prob_threshold` /
|
||||
`compression_ratio_threshold`,未配置的键保持 faster-whisper 默认值)。
|
||||
|
||||
调研过程与结论见 [调研-whisper漏句与decode_full验证.md](./调研-whisper漏句与decode_full验证.md)。
|
||||
|
||||
## 切换模型不改代码
|
||||
|
||||
Reference in New Issue
Block a user