You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
audiocpp_cli.exe --task tts --model D:\models\Qwen3-TTS-12Hz-1.7B-Base --family qwen3_tts --backend cuda --text "Hi there, how are you doing?" --voice-ref sample7s.wav --reference-text "replaced reference text here." --out test.wav
Unsure if this is my user error or an actual bug, would love to know.
@Goshe-nite Can you upload the reference voice and the cmd? The models in audio.cpp are parity safe with Python (of course, my test cases may not cover all cases). I'll try to reproduce the issue.
@Goshe-nite In your cmd, -reference-text "replaced reference text here." may be the issue. This is a placeholder and you need to put the actual text of the reference audio here. Could you try to run ASR for the reference voice and replace "replaced reference text here." with actual text?
@Goshe-nite In your cmd, -reference-text "replaced reference text here." may be the issue. This is a placeholder and you need to put the actual text of the reference audio here. Could you try to run ASR for the reference voice and replace "replaced reference text here." with actual text?
The replaced reference text here. were a placeholder I replaced for the issue, I have used an actual transcript when I was trying it. That said, the files and actual command I used are down below, and the test.wav output if you want to have a listen.
audiocpp_cli.exe --task tts --model D:\models\Qwen3-TTS-12Hz-1.7B-Base --family qwen3_tts --backend cuda --text "Hi there, how are you doing?" --voice-ref mumei7s.wav --reference-text "Oh hi, I'm Nanashi Mumei from Hololive English Council. I'm that forgetful owl who only remembers the things that really matter." --out test.wav
@Goshe-nite My first run produced much worse result lol.
Changing the seed and rerunning will produce different results, and changing the sampler settings will also affect the output. Please check the WAV files below. Does any of them sound better to you?
I also found that the reference WAV files from the repository assets generally produce better results than the audio you provided. I’m wondering whether the Hugging Face demo applies any additional pre-processing to reference audios that is more robust.
I’ll replace the old random-number generator in Qwen3-TTS with the newer one used by the other models. It may or may not affect output quality, but let’s see.
If I have to choose from default 1,2,3, I would say 3 might be better by a small bit. ref_a also has that distortion like voice, ref_b sounds better I think. And for the last three the balanced one sounds the best.
Also thought I'd put the omnivoice version here as well just for comparison: test_omnivoice.wav
test_omnivoice.wav is generated by audio.cpp with the following command,
audiocpp_cli.exe --task tts --model D:\models\OmniVoice --family omnivoice --backend cuda --text "Hi there, how are you doing?" --voice-ref mumei7s.wav --reference-text "Oh hi, I'm Nanashi Mumei from Hololive English Council. I'm that forgetful owl who only remembers the things that really matter." --out test_omnivoice.wav
q3tts_gguf_test.wav is generated with the Qwen3-TTS-GGUF-Extra repo, just thought it'd be interesting to compare.
@Goshe-nite I may find the cause. I used your test case for parity test with randomness controlled. It produced:
samples: C++ 49920, Python 49920
generated frames: C++ 26, Python 26
first/frame code prefixes match
log-mel cosine 0.9878988864
However, when I checked the wavs, cpp sounds robotic. The issue is likely in the decoder. The similarity and ASR based parity checks don't expose this issue.
@Goshe-nite Please check the latest commit e12fc74. Only changed 1 number and now audio.cpp and the Python match almost exactly.
C++ samples: 49920
Python samples: 49920
Same length: yes
Duration: 2.08s both
Waveform cosine: 0.9999996423721313
Max abs diff: 3.0517578125e-05
Mean abs diff: 1.4763000763196032e-05
I find longer ref audio (> ~10s) still tends to generate robotic audio. And also happens for shorter ref audio but longer generations (> ~15s from what I have tested), usually near the end of the longer generations. But I guess this is just the limits of the model.
Appreciate the quick fix and amazing project nonetheless! All the best!
@Goshe-nite If the test is under native weights or FP32 then it's could be model quality. If this happens with quant or weight_type = FP16/BF16, it may be because audio.cpp also changed the precision of the speaker encoder, which could affect quality. This was fixed in f0be201.
Activity
0xShug0 commentedon Jul 16, 2026
@Goshe-nite Can you upload the reference voice and the cmd? The models in audio.cpp are parity safe with Python (of course, my test cases may not cover all cases). I'll try to reproduce the issue.
0xShug0 commentedon Jul 16, 2026
@Goshe-nite In your cmd,
-reference-text "replaced reference text here."may be the issue. This is a placeholder and you need to put the actual text of the reference audio here. Could you try to run ASR for the reference voice and replace "replaced reference text here."with actual text?Goshe-nite commentedon Jul 16, 2026
The
replaced reference text here.were a placeholder I replaced for the issue, I have used an actual transcript when I was trying it. That said, the files and actual command I used are down below, and the test.wav output if you want to have a listen.mumei7s.wav
audio.cpp output: test.wav
Qwen 3 TTS Hugging Face demo: qwen3tts_demo.wav
Either way, thank you for looking into this and I will stay curious as to why this is happening, maybe samplers?
0xShug0 commentedon Jul 16, 2026
@Goshe-nite My first run produced much worse result lol.
Changing the seed and rerunning will produce different results, and changing the sampler settings will also affect the output. Please check the WAV files below. Does any of them sound better to you?
I also found that the reference WAV files from the repository assets generally produce better results than the audio you provided. I’m wondering whether the Hugging Face demo applies any additional pre-processing to reference audios that is more robust.
I’ll replace the old random-number generator in Qwen3-TTS with the newer one used by the other models. It may or may not affect output quality, but let’s see.
issue67_random_default_1.wav
issue67_random_default_2.wav
issue67_random_default_3.wav
issue67_repo_ref_a.wav
issue67_repo_ref_b.wav
issue67_sample_balanced_t075_k35_p085_seed1234.wav
issue67_sample_expressive_t085_k50_p090_subt080_k40_p090_seed1234.wav
issue67_sample_stable_t065_k20_p075_seed1234.wav
Goshe-nite commentedon Jul 16, 2026
If I have to choose from default 1,2,3, I would say 3 might be better by a small bit. ref_a also has that distortion like voice, ref_b sounds better I think. And for the last three the balanced one sounds the best.
Also thought I'd put the omnivoice version here as well just for comparison: test_omnivoice.wav
And a sample generated with https://github.com/Cyrus-Hei/Qwen3-TTS-GGUF-Extra (model quanted to ~q8 by following the readme) for comparison again (would gladly delete this part if you don't like other repos being mentioned): q3tts_gguf_test.wav
0xShug0 commentedon Jul 16, 2026
@Goshe-nite Were test_omnivoice and q3tts_gguf_test.wav generated by audio.cpp?
Goshe-nite commentedon Jul 16, 2026
test_omnivoice.wav is generated by audio.cpp with the following command,
q3tts_gguf_test.wav is generated with the Qwen3-TTS-GGUF-Extra repo, just thought it'd be interesting to compare.
0xShug0 commentedon Jul 16, 2026
@Goshe-nite I may find the cause. I used your test case for parity test with randomness controlled. It produced:
samples: C++ 49920, Python 49920
generated frames: C++ 26, Python 26
first/frame code prefixes match
log-mel cosine 0.9878988864
However, when I checked the wavs, cpp sounds robotic. The issue is likely in the decoder. The similarity and ASR based parity checks don't expose this issue.
request_0_cpp.wav
request_0_python.wav
0xShug0 commentedon Jul 16, 2026
@Goshe-nite Please check the latest commit e12fc74. Only changed 1 number and now audio.cpp and the Python match almost exactly.
C++ samples: 49920
Python samples: 49920
Same length: yes
Duration: 2.08s both
Waveform cosine: 0.9999996423721313
Max abs diff: 3.0517578125e-05
Mean abs diff: 1.4763000763196032e-05
output_cpp_seed1234.wav
output_py_seed1234.wav
0xShug0 commentedon Jul 17, 2026
Please check the updated windows release v0.3.1.
Goshe-nite commentedon Jul 17, 2026
Great stuff! Working way better now!
I find longer ref audio (> ~10s) still tends to generate robotic audio. And also happens for shorter ref audio but longer generations (> ~15s from what I have tested), usually near the end of the longer generations. But I guess this is just the limits of the model.
Appreciate the quick fix and amazing project nonetheless! All the best!
0xShug0 commentedon Jul 17, 2026
@Goshe-nite If the test is under native weights or FP32 then it's could be model quality. If this happens with quant or weight_type = FP16/BF16, it may be because audio.cpp also changed the precision of the speaker encoder, which could affect quality. This was fixed in f0be201.
0xShug0 commentedon Jul 25, 2026
@Goshe-nite Sorry for being overconfident in my answer. The long-form distortion was caused by a bug #105. It has now been fixed—fingers crossed! Please check the latest release: https://github.com/0xShug0/audio.cpp/releases/tag/release-0.4.2