OpenMOSS's MOSS-TTS-Nano-100M: a 100M multilingual voice-cloning TTS.
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.
Every run needs one model file + one codec file from this repo.
--backbone |
--model (codec) |
Total | |
|---|---|---|---|
| Recommended | moss-tts-nano-100m-bf16.gguf |
codec-f16.gguf |
280 MB |
| Smaller | moss-tts-nano-100m-q8_0.gguf |
codec-q8_0.gguf |
169 MB |
| Phones (fastest on ARM CPUs) | moss-tts-nano-100m-q8_0.gguf |
codec-q8_0-lm-q8_0.gguf |
151 MB |
| Smallest | moss-tts-nano-100m-q4_0.gguf |
codec-q4_k_m.gguf |
114 MB |
| File | Size |
|---|---|
codec-f32.gguf |
128 MB |
codec-q5_k_m.gguf |
58 MB |
moss-tts-nano-100m-q4_1.gguf |
64 MB |
moss-tts-nano-100m-q4_k_m.gguf |
64 MB |
moss-tts-nano-100m-q4_k_s.gguf |
60 MB |
moss-tts-nano-100m-q5_0.gguf |
70 MB |
moss-tts-nano-100m-q5_1.gguf |
75 MB |
moss-tts-nano-100m-q5_k_m.gguf |
72 MB |
moss-tts-nano-100m-q5_k_s.gguf |
70 MB |
moss-tts-nano-100m-q6_k.gguf |
81 MB |
With codec.cpp's tts-cli (build it; it bundles llama.cpp), then:
hf download BricksDisplay/MOSS-TTS-Nano-100M-GGUF moss-tts-nano-100m-bf16.gguf codec-f16.gguf --local-dir MOSS-TTS-Nano-100M
./build/tts-cli synthesize --backbone MOSS-TTS-Nano-100M/moss-tts-nano-100m-bf16.gguf --model MOSS-TTS-Nano-100M/codec-f16.gguf \
--ref-audio my_voice.wav --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/MOSS-TTS-Nano-100M-GGUF", "moss-tts-nano-100m-bf16.gguf"),
hf_hub_download("BricksDisplay/MOSS-TTS-Nano-100M-GGUF", "codec-f16.gguf"))
audio, sr = tts.synthesize("你好,欢迎使用语音合成。", ref_audio="my_voice.wav")
soundfile.write("out.wav", audio, sr)
ref_audio= clones the voice; tts.stream(text) yields audio as it is generated. More in the
Python docs.
MOSS-TTS-Nano runs in codec.cpp from pull request #7; build from it until it is merged.
The model files carry the recommended sampling as llama.cpp's
general.sampling.* metadata; tts-cli, tts-server and any llama.cpp host apply them unless
you set your own.
| Setting | Value | tts-cli flag |
|---|---|---|
| temperature | 1.7 | --temp 1.7 |
| top-k | 25 | --top-k 25 |
| top-p | 1.0 (off) | --top-p 1.0 |
| min-p | 0 (off) | --min-p 0.0 |
| sampler order | temperature → top-k → top-p | --samplers "temperature;top_k;top_p" |
Keep top-p at 1.0: the end-of-speech decision is sampled with the same settings, and a lower top-p can cut it, so the speech runs on.
There is no builtin voice: every run needs --ref-audio with a short, clean clip of the voice to use (any sample
rate). Save it with --save-speaker to reuse it without the clip.
apache-2.0, the same as the original model by
MOSI.AI and the OpenMOSS team.
OpenMOSS-Team/MOSS-TTS-Nano-100M