fix(voice): no treble boost before transcription

The 12 dB shelf above 1 kHz from 0.1.34 made the user's speech worse.
Re-transcribing the 34 live recordings of 2026-11-18 (17:32 to 19:53)
with the shelf reproduces every live text; without it "왜 내 방해를"
comes back instead of "올해 내 방해를" (the user said "난 왜 라고
했어" right after), "알아서 좀 조정해 놨는데" instead of "아라해석도
좀 조정해놨는데", and "넌 뭐하는 애야?" instead of an empty text. No
utterance got clearly better with it. Reverts 9f62bfb and 04c23f9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-18 20:04:24 +09:00
parent 499280504e
commit ac633c63ca
4 changed files with 6 additions and 37 deletions

View File

@@ -54,12 +54,6 @@ TARGET_DB = -20.0 # loudness every speaker is brought to, dBFS RMS over the
MAX_GAIN_DB = 40.0 # a whisper at -60 dBFS still reaches the target; pure hiss is not blown up
MIN_GAIN_DB = -20.0
HIGHPASS_HZ = 60.0 # mains hum and desk rumble carry no speech
# Consonants ("ㅈ", "ㅅ") and soft sentence ends live above 1 kHz and are what a dark microphone or a
# swallowed syllable loses. Raised by a shelf that rises over one octave around HIGH_SHELF_HZ. Measured
# with large-v3-turbo (voiced masks from Silero): FLEURS Korean test split (382 clips, held out) 5.11% ->
# 4.85% CER, 25 live utterances of a dark speaker 5.04% -> 3.92%; 6 dB did little, 18-24 dB no better.
HIGH_SHELF_HZ = 1000.0
HIGH_SHELF_DB = 12.0
_KNEE = 0.8 # soft limiter: peaks above this bend smoothly towards the ceiling instead of clipping
_CEILING = 0.98
_WINDOW = 512
@@ -76,10 +70,7 @@ def loudness_equalise(x: np.ndarray, voiced: np.ndarray | None = None) -> np.nda
if len(x) == 0:
return x
spec = np.fft.rfft(x.astype(np.float64))
freqs = np.fft.rfftfreq(len(x), 1 / TARGET_RATE)
spec[freqs < HIGHPASS_HZ] = 0
rise = np.clip(np.log2(np.maximum(freqs, 1.0) / HIGH_SHELF_HZ) + 0.5, 0.0, 1.0)
spec *= 10 ** (HIGH_SHELF_DB * rise / 20)
spec[np.fft.rfftfreq(len(x), 1 / TARGET_RATE) < HIGHPASS_HZ] = 0
y = np.fft.irfft(spec, len(x))
n_win = -(-len(y) // _WINDOW)
frames = np.pad(y, (0, n_win * _WINDOW - len(y))).reshape(n_win, _WINDOW)

View File

@@ -108,18 +108,9 @@ its own streaming Silero VAD (512-sample windows, state kept between frames).
the gain kept between -20 and +40 dB, and peaks above 0.8 are soft-limited below 0.98 instead of
clipping. Measured: speech from -60 dBFS to clipped shouting was transcribed equally well, and quiet
speech under loud clicks or knocks better than with peak normalisation.
Before the level is measured, the band where consonants such as "ㅈ" and "ㅅ" live is raised by
12 dB: a shelf that rises over one octave from 707 Hz to 1.41 kHz (centred on 1 kHz) and stays
flat above. A dark microphone, or a speaker who swallows consonants and sentence ends, loses that
band first. Measured with large-v3-turbo, each clip levelled with its Silero voiced windows as a
final is: on 32 real Discord utterances of such a speaker, 5.04% character errors (18 of 357) on
the 25 whose words are sure, down to 3.92% (14), with sentence ends ("어때", "틀어줘") and words
("연제구는") recovered and none lost; on FLEURS Korean, checked on the held-out test split (382
clips), 5.11% to 4.85%. A wake word whose first consonant is not heard at all ("자비스" as
"아비스" or "다비스") is not fixed by it (14 of 23 exact before and after); call detection's near
match catches those one letter away. 6 dB changed little; 18 and 24 dB were no better on FLEURS
and worse on the real speaker. The noise check below is unchanged with it (108 clips, none with
text).
No treble boost: a 12 dB shelf above 1 kHz (0.1.34) helped FLEURS a little but, on the user's
own 34 live utterances of 2026-11-18, turned "왜" into "올해" and "알아서" into "아라해석" and
dropped a whole sentence, so it was removed again.
### Scheduling