FluidInference/qwen3-tts-coreml

🤗 Hugging Face sourcetext-to-speechapache-2.09.9 GBother✓ 35 checksumsupdated today
Submit in one command

Run it next to your model folder. It makes the torrent, checks your files against Hugging Face, and submits it. You just start seeding and paste your key from your account. It only reads your files and never changes them. Read the script first if you like.

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo FluidInference/qwen3-tts-coreml ./model-folder
Needs a seeder →

Qwen3-TTS CoreML

CoreML conversion of Qwen/Qwen3-TTS (0.6B) for on-device inference on Apple platforms.

Supports English and Chinese text-to-speech synthesis.

Models

Model Description Size
qwen3_tts_lm_prefill_v9 LM KV-cache prefill (text + speaker conditioning) ~2.8 GB
qwen3_tts_lm_decode_v10 Autoregressive LM decode (CB0 codec token generation) ~1.8 GB
qwen3_tts_cp_prefill Code predictor prefill (CB1-15 conditioning) ~432 MB
qwen3_tts_cp_decode Code predictor decode (CB1-15 generation) ~420 MB
qwen3_tts_decoder_10s Audio decoder (16-codebook codes → 24kHz waveform) ~436 MB
speaker_embedding_official.npy Default speaker embedding (1024-dim) 4 KB

Total: ~5.9 GB

Pipeline

Text tokens + Speaker embedding
        ↓
  LM Prefill (KV cache initialization)
        ↓
  LM Decode (CB0 codec tokens, temperature=0.9, top_k=50)
        ↓
  Code Predictor Prefill + Decode (CB1-15 per frame)
        ↓
  Audio Decoder (16 codebooks → 24kHz waveform)
        ↓
  Silence trimming → Final audio

Key Parameters

  • Sample rate: 24,000 Hz
  • Codebooks: 16 (CB0 from LM, CB1-15 from code predictor)
  • Max codec tokens: 125 frames (~10s audio)
  • Sampling: temperature=0.9, top_k=50 (both CB0 and CB1-15)
  • EOS token ID: 2150 (in codec logit space)

Usage

import FluidAudioTTS

let manager = Qwen3TtsManager()
try await manager.loadFromDirectory(modelDir)

let wav = try await manager.synthesize(
    text: "Hello world",
    tokenIds: [9707, 1879, ...],  // Pre-tokenized with Qwen3 processor
    useSpeaker: true
)

See FluidAudio for the full Swift framework.

Conversion

Converted using coremltools from the original PyTorch weights. Conversion scripts are in the mobius repository.

License

Apache-2.0, inherited from Qwen/Qwen3-TTS.

References