Repository navigation
qwen3_asr: scale decode budget for dense-script languages - #239
Open
mufradhossain wants to merge 1 commit into
Open
mufradhossain wants to merge 1 commit into
mufradhossain wants to merge 1 commit into
Conversation
The shared transcript estimate (12 tokens/s of audio) is calibrated on Latin-script tokenizers: English realizes ~1.2 tokens/word (~2.6 tok/s of speech), leaving generous headroom. Qwen3-ASR's tokenizer fragments dense scripts — measured 6.0 tokens/word for Bengali and 4.6 for Hindi on identical text — so fast speech in those scripts reaches ~21 tok/s and continuous Bengali dictation truncates at ~25 s (observed: 1307 tokens budgeted for a 105 s clip that needed ~1457). Give predict_transcript_tokens a per-family rate, default unchanged at 12, and pass 45 from qwen3_asr: the fastest measured speech with 2x margin, still clamped by the decoder context. Validated on a 105 s Bengali clip: rate 12 truncates with a warning, rate 45 decodes the full transcript with no slowdown (13.9 s vs 16.5 s wall clock).
This branch has not been deployed
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.
The shared transcript estimate (12 tokens/s of audio) is calibrated on Latin-script tokenizers: English realizes ~1.2 tokens/word (~2.6 tok/s of speech), leaving generous headroom. Qwen3-ASR's tokenizer fragments dense scripts — measured 6.0 tokens/word for Bengali and 4.6 for Hindi on identical text — so fast speech in those scripts reaches ~21 tok/s and continuous Bengali dictation truncates at ~25 s (observed: 1307 tokens budgeted for a 105 s clip that needed ~1457).
Give predict_transcript_tokens a per-family rate, default unchanged at 12, and pass 45 from qwen3_asr: the fastest measured speech with 2x margin, still clamped by the decoder context. Validated on a 105 s Bengali clip: rate 12 truncates with a warning, rate 45 decodes the full transcript with no slowdown (13.9 s vs 16.5 s wall clock).
Summary
I was using Bengali dictation through Handy and long clips kept truncating around 25 s. Looking into it: the shared transcript estimate (12 tokens/s of audio) is calibrated for Latin-script tokenizers — running the same text through Qwen3-ASR's tokenizer gives ~6 tokens/word for Bengali vs ~1.2 for English, so continuous Bengali speech outpaces the budget. This gives predict_transcript_tokens() a per-family rate (default stays 12, so no other family changes) and qwen3_asr passes 45.
Scope
AI Assistance
I have used GLM 5.3 to implement the C++ changes based on the measurements I found. I reviewed the diff and ran the validations myself.
Validation
say -v Piya -r 210, so anyone with a Mac can regenerate it): rate 12 →output truncated at 1307 tokens, exit 1; rate 45 → full transcript through the last word, exit 0, and slightly faster (13.9 s vs 16.5 s — the budget is a ceiling, not an allocation)Limitations