Skip to content

Qwen3 TTS 1.7B base generating robotic voices #67

Closed

Description

@Goshe-nite

Issue:
I was trying to use Qwen3TTS for voice cloning with audiocpp_cli but had weird results, tried with a 7s clip and a 22s clip. The resulting clips are robotic and distorted, heavily differs from the result I got from https://huggingface.co/spaces/Qwen/Qwen3-TTS. (I also tested OmniVoice, and there's no problem with it, outputs came out perfect.)

Relevant Info:
Release: audiocpp-windows-cuda-balance-61e14f5.zip
Model used: https://huggingface.co/Qwen/Qwen3-TTS-12Hz-1.7B-Base
audio file specs: ~7 seconds, 24000hz sampling rate
Command used (ref audio and text replaced, can provide if needed):
GPU: 3090
OS: Windows 11

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.

Activity

  1. 0xShug0 commented on Jul 16, 2026

    @0xShug0
    Owner

    @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.

  2. self-assigned this
    on Jul 16, 2026
  3. 0xShug0 commented on Jul 16, 2026

    @0xShug0
    Owner

    @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?

  4. Goshe-nite commented on Jul 16, 2026

    @Goshe-nite
    Author

    @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.

    mumei7s.wav

    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
    

    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?

  5. 0xShug0 commented on Jul 16, 2026

    @0xShug0
    Owner

    @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

  6. Goshe-nite commented on Jul 16, 2026

    @Goshe-nite
    Author

    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

  7. 0xShug0 commented on Jul 16, 2026

    @0xShug0
    Owner

    @Goshe-nite Were test_omnivoice and q3tts_gguf_test.wav generated by audio.cpp?

  8. Goshe-nite commented on Jul 16, 2026

    @Goshe-nite
    Author

    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.

  9. 0xShug0 commented on Jul 16, 2026

    @0xShug0
    Owner

    @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

  10. 0xShug0 commented on Jul 16, 2026

    @0xShug0
    Owner

    @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

  11. 0xShug0 commented on Jul 17, 2026

    @0xShug0
    Owner

    Please check the updated windows release v0.3.1.

  12. Goshe-nite commented on Jul 17, 2026

    @Goshe-nite
    Author

    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!

  13. 0xShug0 commented on Jul 17, 2026

    @0xShug0
    Owner

    @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.

  14. 0xShug0 commented on Jul 25, 2026

    @0xShug0
    Owner

    @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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions