Skip to content

fix(stt): stop fabricating Qwen3-ASR stream timestamps - #930

Open
ainergiz wants to merge 3 commits into
Blaizzy:mainfrom
ainergiz:fix/qwen3-asr-stream-timestamps
Open

fix(stt): stop fabricating Qwen3-ASR stream timestamps#930
ainergiz wants to merge 3 commits into
Blaizzy:mainfrom
ainergiz:fix/qwen3-asr-stream-timestamps

Conversation

@ainergiz

@ainergiz ainergiz commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #927.

Qwen3-ASR derives partial streaming timestamps from token-budget progress, so changing max_tokens changes the reported timing for identical text. Generated text has no real audio alignment, so this change makes text deltas untimed and keeps only coarse audio chunk extents.

Changes

  • Return start_time=None and end_time=None for text-delta events.
  • Keep numeric start/end values on empty-text chunk-boundary events.
  • Clamp chunk boundaries to the real input duration before model-only padding.
  • Buffer untimed text into the matching chunk in the CLI.
  • Preserve an untimed final text segment in JSON.
  • Raise a clear error instead of silently writing empty SRT/VTT output when no timed boundary exists.
  • Document the streaming event contract and point users to the forced aligner for text-level timestamps.

Compatibility

Streaming consumers must handle nullable start_time and end_time on text deltas. The server serializes these as null. Numeric values are coarse audio chunk extents, not transcription timestamps.

Validation

  • Focused streaming tests: 12 passed.
  • Full STT suite: 283 passed, 9 skipped, 18 subtests passed.
  • Black, isort, and git diff --check passed.
  • Confirmed identical partial timestamp metadata for max_tokens=64 and 8192.

@github-actions

Copy link
Copy Markdown

⚠️ The pre-commit checks failed in CI.

Run the following from the repository root, then commit and push any changes:

python -m pip install pre-commit
pre-commit run --all-files

The project's pre-commit configuration includes Black and the other required formatters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Qwen3-ASR streaming timestamps depend on max_tokens instead of audio time

2 participants