Support Qwen3-TTS prompt modes without ICL reference codes - #202
Open
fedeizzo wants to merge 1 commit into
Open
Conversation
Add support for x-vector prompt modes and optional reference audio decoding when running Qwen3-TTS without ICL reference codes.
Contributor
There is literally nothing wrong with that. That is not early 2026 ;) |
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.
Originated from #170
What does this PR do?
include/engine/models/qwen3_tts/talker.h,src/models/qwen3_tts/talker.cpp: addvalidate_qwen3_talker_voice_clone_prefill()to validate prompt mode parameters and add support forx_vector_only_modeprompt embedding construction when voice prompts do not include ICL reference codes.src/models/qwen3_tts/session.cpp: support voice prompt execution without ICL reference codes by conditionally routing tospeech_decoder_->decode()orspeech_decoder_->decode_and_trim_reference()when reference codes are present/absent, and ensurerelease_talker_cached_step_graphcleanup is exception-safe.Option parsing in
assets.cppandsession.cppis left as-is in this PR to keep the review surface focused prior to the spec-v1 migration.Motivation
When running Qwen3-TTS in base or voice-prompt mode without ICL reference codes, the session required reference codes to be present even if an x-vector speaker embedding was supplied. Supporting x-vector-only prefill allows Qwen3-TTS to execute without requiring reference codes while keeping reference audio trimming clean and safe.
Gains
Correctness-matched Ryzen AI Max / Strix Halo results with HIP graphs disabled:
All 29 cold, warmup, and measured calls produced the same audio digest and sample metadata.
Mixed-Shape & Extended Longform Validation (Addressing Issue #105)
To ensure this PR does not reintroduce the decoder graph reuse issues described in #105 across varying request lengths, we validated both consecutive mixed-shape requests as well as extended multi-paragraph longform synthesis:
1. Consecutive Mixed-Shape Requests (Short -> Long -> Short)
2.08 s765.89 ms9.76 s1103.90 ms1.84 s755.23 ms2. Extended Multi-Paragraph Longform Synthesis Test
43.2 seconds(24 kHz audio)25.4 seconds(1.70x Real-Time Speed, RTF0.59)2,453.65 msAll consecutive and extended longform requests completed cleanly without state leakage, audio distortion, or decoder graph shape mismatch errors.
How to use it
Use
audiocpp_clinormally with Qwen3-TTS:audiocpp_cli --task tts --model models/Qwen3-TTS-12Hz-1.7B-Base-GGUF \ --text "Hello from Qwen3 TTS." --out out.wavAI usage disclosure
AI was used for the following purposes:
AI was NOT used for the following purposes: