MediaTek Research's BreezyVoice: Taiwanese-Mandarin TTS with builtin voices and voice cloning.
Two files make one model, as with llama.cpp's multimodal projectors: the model file is the text-to-speech LM backbone, run by llama.cpp; the codec file holds the audio side (decoder / vocoder, speaker encoders and the adaptor between the two), run by codec.cpp. The runtimes below wire the two graphs together, on CPU or GPU (CUDA, Vulkan, Metal), fully offline.
This backbone needs the CosyVoice relative-position architecture, which upstream llama.cpp does not have yet: use the llama.cpp that codec.cpp or llama.rn builds (they carry the patch), not a stock llama.cpp.
Every run needs one model file + one codec file from this repo.
--backbone |
--model (codec) |
Total | |
|---|---|---|---|
| Recommended | breezyvoice-lm-f16.gguf |
breezyvoice-codec-q8_0.gguf |
840 MB |
| Smallest | breezyvoice-lm-q4_k_m.gguf |
breezyvoice-codec-q4_k_m.gguf |
470 MB |
| Best quality | breezyvoice-lm-f16.gguf |
breezyvoice-codec-f16.gguf |
1.2 GB |
| File | Size |
|---|---|
breezyvoice-codec-f32.gguf |
1.5 GB |
breezyvoice-codec-q5_k_m.gguf |
331 MB |
breezyvoice-lm-q8_0.gguf |
250 MB |
With codec.cpp's tts-cli (build it; it bundles llama.cpp), then:
hf download BricksDisplay/BreezyVoice-GGUF breezyvoice-lm-f16.gguf breezyvoice-codec-q8_0.gguf --local-dir BreezyVoice
./build/tts-cli synthesize --backbone BreezyVoice/breezyvoice-lm-f16.gguf --model BreezyVoice/breezyvoice-codec-q8_0.gguf \
--voice zh_female --text "今天天氣真好,我們一起去公園走走吧。" --output out.wav
Clone a voice (give the clip's transcript for the closest match):
./build/tts-cli synthesize ... --ref-audio ref.wav --ref-text "參考音訊的逐字稿" --text "..." --output out.wav
All tts-cli options (voices, voice cloning, sampling, GPU) are described in the codec.cpp README.
The codec_cpp package runs the same pipeline (it builds codec.cpp with its
bundled llama.cpp, so it needs CMake and a C++ compiler):
pip install "codec-cpp @ git+https://github.com/mybigday/codec.cpp" huggingface_hub soundfile
import codec_cpp, soundfile
from huggingface_hub import hf_hub_download
tts = codec_cpp.TTS(hf_hub_download("BricksDisplay/BreezyVoice-GGUF", "breezyvoice-lm-f16.gguf"),
hf_hub_download("BricksDisplay/BreezyVoice-GGUF", "breezyvoice-codec-q8_0.gguf"))
audio, sr = tts.synthesize("今天天氣真好,我們一起去公園走走吧。", voice="zh_female")
soundfile.write("out.wav", audio, sr)
tts.voices() lists the builtin voices; ref_audio= clones a voice where the
model supports it; tts.stream(text) yields audio as it is generated. More in
the Python docs.
llama.rn loads the same two files on iOS and Android:
const ctx = await initLlama({ model: 'breezyvoice-lm-f16.gguf', embedding: true })
await ctx.initVocoder({ path: 'breezyvoice-codec-q8_0.gguf' })
const { prompt, grammar, embedding, flow } = await ctx.getFormattedAudioCompletion({
prompt: 'Hello world',
speaker: 'zh_female',
})
const result = await ctx.completion({ prompt, grammar, embedding })
const pcm = flow === 'continuous_embd'
? await ctx.decodeAudioEmbeddings(result.embeddings, result.embedding_dim)
: await ctx.decodeAudioTokens(result.audio_tokens)
Voice cloning, saved voices and per-model notes: llama.rn TTS docs.
The model files carry the recommended sampling as llama.cpp's
general.sampling.* metadata, the settings of the original inference code;
tts-cli, tts-server, llama.rn and any llama.cpp host apply them unless
you set your own.
| Setting | Value | tts-cli flag |
|---|---|---|
| temperature | 1.0 | --temp 1.0 |
| top-k | 25 | --top-k 25 |
| top-p | 1.0 (off) | --top-p 1.0 |
| min-p | 0 (off) | --min-p 0.0 |
BreezyVoice samples with plain top-k (no repetition-aware sampling).
zh_female (default), zh_male, ja_male, yue_female,
en_female, en_male, ko_female.--ref-audio plus --ref-text (its transcript). Without the
transcript it still works, with a looser match.apache-2.0, the same as the original model.