Skip to content

Add opt-in Qwen3 ASR punctuated text output - #433

Merged
0xShug0 merged 1 commit into
mainfrom
fix/qwen3-asr-preserve-text-punctuation
Sep 3, 2026
Merged

Add opt-in Qwen3 ASR punctuated text output#433
0xShug0 merged 1 commit into
mainfrom
fix/qwen3-asr-preserve-text-punctuation

Conversation

@0xShug0

@0xShug0 0xShug0 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Fixes #430

Summary

This adds an opt-in Qwen3 ASR request option, qwen3_asr.preserve_punctuation, for timestamped chunked ASR output.

By default, the existing --words-out behavior is unchanged: merged text_output is rebuilt from aligned word timestamps, so punctuation is omitted. When the new option is enabled, merged text_output keeps the punctuated ASR chunk text while still returning word timestamps.

Root cause

For multi-chunk Qwen3 ASR requests with timestamps enabled, the merge path rebuilds text_output from WordTimestamp.word. Those aligned words are word-only, so punctuation is lost even though the ASR chunk text has punctuation.

Behavior

Case Command shape Result
VAD + timestamps, default --audio-chunk-mode vad --words-out Unchanged: text_output is rebuilt from aligned words, so punctuation is omitted.
VAD + timestamps, opt-in --audio-chunk-mode vad --words-out --request-option qwen3_asr.preserve_punctuation=true text_output preserves ASR punctuation.
VAD without timestamps --audio-chunk-mode vad Unchanged: ASR punctuation is preserved.
Fixed chunking + timestamps, default --audio-chunk-mode fixed --words-out Unchanged: text_output is rebuilt from aligned words.

Validation

Built and validated with the Qwen3 ASR CLI path on CUDA using the repo sample audio asset.

Validation Output
Default VAD + timestamps Some call me nature Others call me Mother Nature I've been here for over four point five billion years Twentytwo thousand five hundred times longer than you
Opt-in VAD + timestamps Some call me nature. Others call me Mother Nature. I've been here for over four point five billion years. Twenty-two thousand five hundred times longer than you.
VAD without timestamps Some call me nature. Others call me Mother Nature. I've been here for over four point five billion years. Twenty-two thousand five hundred times longer than you.
Default fixed chunking + timestamps Some call me nature others call me Mother Nature I've been here for over four point five billion years Twentytwo thousand five hundred times longer than you

Commands checked:

cmake --build build/debug -j$(nproc) --target audiocpp_cli
jq empty model_specs/qwen3_asr.json
audiocpp_cli --task asr --family qwen3_asr --backend cuda --audio assets/resources/sample_16k.wav --audio-chunk-mode vad --audio-chunk-seconds 5 --session-option qwen3_asr.forced_aligner_model_path=<Qwen3-ForcedAligner-GGUF> --text-out <out.txt> --words-out <words.json> --metrics --log --log-file <run.log>
audiocpp_cli --task asr --family qwen3_asr --backend cuda --audio assets/resources/sample_16k.wav --audio-chunk-mode vad --audio-chunk-seconds 5 --session-option qwen3_asr.forced_aligner_model_path=<Qwen3-ForcedAligner-GGUF> --request-option qwen3_asr.preserve_punctuation=true --text-out <out.txt> --words-out <words.json> --metrics --log --log-file <run.log>

@0xShug0
0xShug0 merged commit ed4aed2 into main Sep 3, 2026
6 checks passed
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] Punctuation is stripped/filtered out in --text-out

1 participant