MOSS-TTSD v0.5 — GGUF
MOSS-TTSD v0.5: spoken dialogue between two speakers, in Chinese and English.
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.
Files
Every run needs one model file + one codec file from this repo.
--backbone |
--model (codec) |
Total | |
|---|---|---|---|
| Recommended | moss-ttsd-v0.5-bf16.gguf |
codec-q8_0.gguf |
4.7 GB |
| Smallest | moss-ttsd-v0.5-bf16.gguf |
codec-q4_k_m.gguf |
4.5 GB |
Use the bf16 model file: moss-ttsd-v0.5-q8_0.gguf often produces babble.
| File | Size |
|---|---|
codec-q5_k_m.gguf |
1.1 GB |
moss-ttsd-v0.5-q8_0.gguf |
1.8 GB |
Command line (codec.cpp)
With codec.cpp's tts-cli (build it; it bundles llama.cpp), then:
hf download BricksDisplay/MOSS-TTSD-v0.5-GGUF moss-ttsd-v0.5-bf16.gguf codec-q8_0.gguf --local-dir MOSS-TTSD-v0.5
./build/tts-cli synthesize --backbone MOSS-TTSD-v0.5/moss-ttsd-v0.5-bf16.gguf --model MOSS-TTSD-v0.5/codec-q8_0.gguf \
--text "[S1]你好,欢迎收听今天的节目。[S2]谢谢,很高兴来到这里。" --output out.wav
All tts-cli options (voices, voice cloning, sampling, GPU) are described in the codec.cpp README.
Python
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/MOSS-TTSD-v0.5-GGUF", "moss-ttsd-v0.5-bf16.gguf"),
hf_hub_download("BricksDisplay/MOSS-TTSD-v0.5-GGUF", "codec-q8_0.gguf"))
audio, sr = tts.synthesize("[S1]你好,欢迎收听今天的节目。[S2]谢谢,很高兴来到这里。")
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.
React Native (llama.rn)
llama.rn loads the same two files on iOS and Android:
const ctx = await initLlama({ model: 'moss-ttsd-v0.5-bf16.gguf', embedding: true })
await ctx.initVocoder({ path: 'codec-q8_0.gguf' })
const { prompt, grammar, embedding, flow } = await ctx.getFormattedAudioCompletion({
prompt: 'Hello world',
})
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.
Input text
Mark each turn with [S1] or [S2] for the two speakers.
Sampling
The model files carry the recommended sampling as llama.cpp's
general.sampling.* metadata, the settings of the original model's generation_config.json;
tts-cli, tts-server, llama.rn and any llama.cpp host apply them unless
you set your own.
| Setting | Value | tts-cli flag |
|---|---|---|
| temperature | 0.9 | --temp 0.9 |
| top-k | 50 | --top-k 50 |
| top-p | 0.95 | --top-p 0.95 |
| min-p | 0 (off) | --min-p 0.0 |
| sampler order | penalties → temperature → top-k → top-p | --samplers "penalties;temperature;top_k;top_p" |
The first codebook is sampled from the backbone, the other channels by the codec heads; both use these settings.
License
apache-2.0, the same as the original model.