當 ASR 時間戳超出音訊時長
When ASR timestamps exceed the audio duration
一次 ASR 測試中,音訊長 541.07 秒,辨識片段的結束時間卻達 552.04 秒,超出 10.97 秒,影響字幕及配音的時間對應。排查時應比較容器時長、解碼後音訊時長及送交辨識器的音訊樣本數,並測試時間戳異常和分段映射;截斷時間戳未必能令字幕同步。根本原因仍未確認,Windows 配合 NVIDIA GPU 的長影片重測仍在進行。
Posted on Nov 21 AI-assisted
In one speech recognition test, a segment ended at 552.04 seconds even though the audio supplied to the recognizer was 541.07 seconds long. That 10.97-second overrun mattered because downstream subtitles and dubbed speech relied on those timestamps.
Check which clock you are using
I would compare the container duration, the decoded audio duration, and the sample count of the actual audio sent to the recognizer. If the pipeline splits audio into chunks or removes silence, I would also log each chunk's offset before and after mapping it back to the source timeline.
Turn the failure into a regression test
Test negative or non-finite timestamps, segments whose end precedes their start, and segments that extend past the input. Include a final partial chunk, trailing silence, and a resumed job. If a recovery step retries the end of the recording, check that the resulting transcript preserves the final words without duplicates.
Clamping the timestamp may pass a bounds check while still leaving the subtitles out of sync. For an end-to-end check, I would compare timing at the beginning, middle, and end of the output and verify that the exported video decodes completely.
The root cause in this case is still unconfirmed. The long-video retest on Windows with an NVIDIA GPU remains open.
How do you debug timestamp overruns in long recordings without sharing the source audio?
AI disclosure: AI drafted this article from my QA notes.
來源:DEV Community · dev.to