Views
No views yet
coremltools to run on the Apple Neural Engine (ANE) of
Apple Silicon (M1 and later) for low-power, low-memory local TTS inference.If you want to try this CoreML pipeline embedded in a finished app right away, you can use KeyVoice (a macOS voice-input app).
⚠️ This repository contains only the Audio Tokenizer (CoreML). To run the full TTS pipeline you must also load the LM weights from Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice.
| File | Role | Size |
|---|---|---|
Qwen3TTSDecoder.mlpackage | Audio Token → Mel Decoder | 218 MB |
Qwen3TTSEncoder.mlpackage | Reference audio PCM → Audio Token Encoder (Voice Cloning) | 182 MB |
Qwen3TTSSpeakerEncoder.mlpackage | Reference audio → Speaker Embedding (Voice Design) | 46 MB |
coremltools 8.x).cpuAndNeuralEngine (ANE-optimized)audio_tokens [1, 16, T_frames] (Int32) — 16 codebooks × T framesmel [1, 80, T_mel] (Float32)audio [1, 1, 28800] (Float32) — fixed-length 1.2 s at 24 kHz (15 frames × 1920 samples)audio_tokens [1, 16, 15] (Int32)mel [1, 80, T] (Float32)embedding [1, D] (Float32) — speaker vector for Voice Design1import CoreML
2
3let url = URL(fileURLWithPath: "./Qwen3TTSDecoder.mlpackage")
4let compiledURL = try await MLModel.compileModel(at: url)
5let config = MLModelConfiguration()
6config.computeUnits = .cpuAndNeuralEngine
7let model = try MLModel(contentsOf: compiledURL, configuration: config)
8// Feed audio_tokens [1, 16, T_frames] to obtain mel output1import coremltools as ct
2model = ct.models.MLModel("./Qwen3TTSDecoder.mlpackage")
3print(model.get_spec()).mlpackage to .mlmodelc, which takes ~30 seconds the first time.1@misc{qwen3-tts-12hz-1.7b-customvoice-coreml,
2 author = {okayuji},
3 title = {Qwen3-TTS 12Hz 1.7B CustomVoice — CoreML conversion},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/okayuji/Qwen3-TTS-12Hz-1.7B-CustomVoice-CoreML}}
7}1@misc{qwen3-tts,
2 title = {Qwen3-TTS Technical Report},
3 author = {Qwen Team},
4 year = {2026},
5 eprint = {2601.15621},
6 archivePrefix = {arXiv},
7 howpublished = {\url{https://huggingface.co/Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice}}
8}