Dev

Bounded Speech-Recognition Timestamp Recovery

The audio pipeline now verifies the actual PCM WAV duration before speech recognition and applies bounded timestamp normalization. Valid cues are kept; small end overruns (default up to 10 ms) are clipped, while other invalid values are excluded locally. Corrections or losses add the AUDIO_STT_TIMESTAMPS_RECOVERED diagnostic and mark the result partial.

Audio speech recognition (STT) processing has become more resilient to small timestamp overruns. What changed. Before sending a segment to the provider, the pipeline verifies the actual PCM WAV: format, frame count, and readability of declared PCM data. If the actual duration differs from the expected duration by more than 1 ms, the attempt fails. A new bounded normalizer then operates in local segment coordinates. Correct cues are left unchanged. If a cue's end crosses the boundary by a few milliseconds (default allowance up to 10 ms), it is clipped to the boundary. Significant, outside, or unrepresentable timestamps are excluded locally. Partial-loss behavior. If no usable cue remains after validation, the STT attempt reports AUDIO_STT_TIMESTAMP_INVALID. An explicitly empty response with empty text is treated as silence. If words inside an accepted cue do not fit its bounds, the optional word set for that cue is discarded while its text is retained. Observable signals. When timestamps are corrected or excluded, a successful attempt receives AUDIO_STT_TIMESTAMPS_RECOVERED and the final run is marked PARTIAL. Such outputs are not considered reusable; whole-source retry can re-run STT for affected parts. Logs include numeric accepted/adjusted/rejected counters and coordinates without recognition text, raw provider responses, secrets, or local paths. Boundary. This change recovers valid cues for small overruns; it does not prove that a deployed backend correctly recognizes speech through the final seconds of a long audio file.

← Back to news