wrapper: hum bypasses high-pass chain; docs clarified

This commit is contained in:
Fisto
2026-09-16 13:22:16 +02:00
parent 1f77dfba64
commit 4d1c31f1c9
3 changed files with 9 additions and 3 deletions
+2
View File
@@ -71,6 +71,8 @@ without them.
final -18.6 LUFS / -3.0 dBFS, apply pass +~10 ms. `VESKSLOP_TTS_HUM_MS=0` disables and
reproduces the previous output byte-for-byte. Tuning: `_HUM_HZ` (30-200), `_HUM_DB`
(-80..-6; raise toward -36 if a client still gates the start).
The hum bypasses the high-pass/trim chain, so `VESKSLOP_TTS_HIGHPASS` (up to 400 Hz)
cannot remove it (verified at 200 and 400 Hz).
## SAPI4 runtime engine discovery (`speech.dll`)
+5 -3
View File
@@ -240,9 +240,11 @@ record what the engine needs to interpret, add, or hide._
`_HUM_DB` (-80..-6). It sits about 45 dB under the speech peak; raise `_HUM_DB` toward
-36 if a client still gates the start, lower it for stealth. Generated in the same
ffmpeg pass (no extra process) and not part of the EBU measurement, so the documented
loudness/peak targets still hold. Measured: hum 75.0 Hz / -48.0 dBFS, speech onset at
about 110 ms, final -18.6 LUFS / -3.0 dBFS; `HUM_MS=0` reproduces the previous output
byte-for-byte.
loudness/peak targets still hold. The hum is mixed on its own chain and bypasses the
high-pass/trim chain, so raising `VESKSLOP_TTS_HIGHPASS` (40-400 Hz) never removes it
(verified at 200 and 400 Hz: still 75.0 Hz / -48.0 dBFS). Measured: hum 75.0 Hz /
-48.0 dBFS, speech onset at about 110 ms, final -18.6 LUFS / -3.0 dBFS; `HUM_MS=0`
reproduces the previous output byte-for-byte.
### Voice IDs
+2
View File
@@ -397,6 +397,8 @@ if [ "$HUM_MS" -gt 0 ]; then
HUM_AMP=$(awk -v db="$HUM_DB" 'BEGIN{printf "%.6f", 10^(db/20)}')
HUM_FADE=$(awk -v s="$HUM_S" 'BEGIN{ f=s/4; if (f>0.02) f=0.02; if (f<0.005) f=0.005; printf "%.3f", f }')
HUM_FADE_OUT=$(awk -v s="$HUM_S" -v f="$HUM_FADE" 'BEGIN{printf "%.3f", s-f}')
# The hum is mixed on its own chain and deliberately bypasses $PRE (highpass,
# trim, fades): VESKSLOP_TTS_HIGHPASS must never remove it.
if ! "$MICROSLOP_FFMPEG" -hide_banner -nostats -y \
-f lavfi -i "aevalsrc=exprs='$HUM_AMP*sin(2*PI*$HUM_HZ*t)':s=48000:d=$HUM_S" \
-i "$RAW" \