Add opt-in Qwen3 ASR punctuated text output - #433
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-outbehavior is unchanged: mergedtext_outputis rebuilt from aligned word timestamps, so punctuation is omitted. When the new option is enabled, mergedtext_outputkeeps 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_outputfromWordTimestamp.word. Those aligned words are word-only, so punctuation is lost even though the ASR chunk text has punctuation.Behavior
--audio-chunk-mode vad --words-outtext_outputis rebuilt from aligned words, so punctuation is omitted.--audio-chunk-mode vad --words-out --request-option qwen3_asr.preserve_punctuation=truetext_outputpreserves ASR punctuation.--audio-chunk-mode vad--audio-chunk-mode fixed --words-outtext_outputis rebuilt from aligned words.Validation
Built and validated with the Qwen3 ASR CLI path on CUDA using the repo sample audio asset.
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 youSome 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.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.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 youCommands checked: