Raise tail pad to 3s so short transmissions are not clipped
The recording window is anchored to OP25 control-channel timestamps, but the buffered audio lags those by roughly 1.5s. Trim logs across seven calls measured the offset at 0.84-1.62s, consistently present. At a 1.0s pad a short call closed its window before the voice arrived: a 0.97s control-channel call closed at T+1.97 while voice started around T+1.5, capturing ~0.4s of speech and cutting mid-word. Confirmed by a 0.57s file whose final 0.10s measured -12.2dB against its own -18.2dB average - clipped speech, not a tail - and by two short calls that logged no trim at all because no trailing silence remained. Being generous is free here: trim_silence already strips trailing silence back to the guard margin before upload, so long calls are unaffected while short ones gain the window they need. Over-capture costs nothing; under-capture loses words permanently. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -38,9 +38,13 @@ CALL_IDLE_TIMEOUT=3
|
||||
|
||||
# Seconds of audio kept after the last transmission ends. This is the only
|
||||
# headroom protecting the final word of a transmission — usually the disposition
|
||||
# or the address. Measured at 0.5s it left ~0.3s of real margin and one recording
|
||||
# ended mid-word, hence 1.0.
|
||||
CALL_TAIL_PAD_SECONDS=1.0
|
||||
# or the address. Raised 1.0 -> 3.0 after field measurement showed the
|
||||
# grant-to-speech offset is ~0.84-1.62s (typically ~1.5s): at 1.0s pad, short
|
||||
# calls had their recording window close before the voice even started,
|
||||
# clipping speech mid-word. Safe to be generous — trim_silence already strips
|
||||
# the extra back off long calls before upload, so only short transmissions
|
||||
# actually benefit from the larger window.
|
||||
CALL_TAIL_PAD_SECONDS=3.0
|
||||
|
||||
# Strip leading/trailing dead air before upload. ~63% of an untrimmed recording
|
||||
# is silence, which costs Whisper spend and makes it hallucinate text that was
|
||||
|
||||
Reference in New Issue
Block a user