MOSS-TTS Family
ย ย ย ย
MOSS-TTS-Local-Transformer-v1.5
MOSS-TTS-Local-Transformer-v1.5 is continued from MOSS-TTS-Local-Transformer-v1.0. It preserves the main 1.0 capabilities, including zero-shot voice cloning, long-form speech generation, token-level duration control, Pinyin/IPA pronunciation control, multilingual synthesis, and code-switching. For the full 1.0 feature walkthrough, input schema, and evaluation tables, please refer to the MOSS-TTS-Local-Transformer-v1.0 README.
Compared with MOSS-TTS-Local-Transformer-v1.0, v1.5 focuses on the following improvements:
- Higher-fidelity stereo audio modeling: v1.5 uses MOSS-Audio-Tokenizer-v2 as the audio tokenizer, supporting native 48 kHz stereo input and output for richer spatial detail and more natural perceived audio quality. Since the codec output is stereo, save the
[channels, samples] tensor returned by processor.decode(...) directly.
- Stronger multilingual synthesis with language tags: when the
language field is omitted, v1.5 may improve some languages and regress slightly on others compared with 1.0. When the language is specified, v1.5 is stronger than 1.0 on almost all supported languages. Set the tag when building the user message, for example processor.build_user_message(text=text_fr, language="French").
- More stable voice cloning: v1.5 improves speaker similarity and reduces cloning variance, making repeated generations more consistent.
- Better long-reference, short-text cloning: v1.5 handles scenarios where the reference audio is much longer than the target text more reliably than 1.0.
- More stable punctuation-following prosody: v1.5 follows punctuation-driven pauses more closely, especially in long sentences.
- Explicit pause control: v1.5 supports inline pause markers such as
"[pause 3.2s]". For example, ๆไปๅคฉๅญฆไน ไบไธ้ฆไธญๅฝ็ๅค่ฏ๏ผๅฎ็ๅๅญๆฏ[pause 3.2s]้ๅคๆ๏ผ inserts an explicit 3.2s pause before ้ๅคๆ.
Supported Languages
MOSS-TTS Local Transformer v1.5 supports 31 languages. It keeps the 20 languages supported by MOSS-TTS-Local-Transformer-v1.0 and extends multilingual continued training to additional languages including Cantonese, Dutch, Finnish, Hindi, Macedonian, Malay, Romanian, Swahili, Tagalog, Thai, and Vietnamese.
Quick Start
Environment Setup
We recommend a clean, isolated Python environment with Transformers 5.0.0, or a recent Transformers version with Qwen3 support, to avoid dependency conflicts.
Install all required dependencies:
(Optional) Install FlashAttention 2
For better speed and lower GPU memory usage, you can install FlashAttention 2 if your hardware supports it.
If your machine has limited RAM and many CPU cores, you can cap build parallelism:
Notes:
- Dependencies are managed in
pyproject.toml, which currently pins torch==2.9.1+cu128 and torchaudio==2.9.1+cu128.
- If FlashAttention 2 fails to build on your machine, you can skip it and use the default attention backend.
- FlashAttention 2 is only available on supported GPUs and is typically used with
torch.float16 or torch.bfloat16.
Basic Usage
Tip: MOSS-TTS-Local-Transformer-v1.5 uses a fixed 12-codebook RVQ depth. Do not set n_vq_for_inference to a value different from config.n_vq.
MOSS-TTS-Local-Transformer-v1.5 provides the standard Hugging Face AutoProcessor and AutoModel interface. The examples below cover:
- Direct generation with language tags
- Voice cloning
- Duration control
- Explicit pause control with
[pause X.Ys]
Generation Parameters
Notes
- This repository uses Hugging Face remote code. Load it with
trust_remote_code=True.
- The MOSS-TTS-Local-Transformer-v1.5 codec is stereo.
processor.decode(...) returns audio tensors shaped as [channels, samples], so save them directly with torchaudio.save(path, audio, sampling_rate).
- Audio encoding and decoding use
OpenMOSS-Team/MOSS-Audio-Tokenizer-v2.
- The model configuration sets
sampling_rate to 48000 and n_vq to 12.
- If FlashAttention 2 is unavailable, the example falls back to SDPA on CUDA and eager attention on CPU.
SGLang Usage
You can serve MOSS-TTS-Local-Transformer-v1.5 with SGLang-Omni, which exposes an OpenAI-compatible /v1/audio/speech API for reference-less synthesis, zero-shot voice cloning, streaming, duration control, and language/style hints.
See the MOSS-TTS-Local cookbook for installation, full API details, deployment config, benchmarking, and limitations.
Install and Serve
Install sglang-omni by following the SGLang-Omni installation guide, then download and serve the model:
A matching config file is available in SGLang-Omni at examples/configs/moss_tts_local.yaml.
Basic Speech
Voice Cloning
Provide a reference clip and its transcript for better speaker similarity. audio_path may be a local path readable by the server, an HTTP(S) URL, or a base64 data URI.
ref_audio and ref_text are accepted as shorthand for references[0].audio_path and references[0].text.
Streaming
Set "stream": true, "response_format": "pcm", and "stream_format": "audio" to receive raw 48 kHz PCM chunks. Pipe the stream through ffmpeg to write a playable WAV file:
Duration, Markup, and Language
Duration can be guided with an inline ${token:N} prefix or with token_count / duration_tokens. Inline markup such as [pause 0.5s], Pinyin, and IPA is passed through unchanged. Use language to hint the target language and instructions for free-form style guidance.
More Usage
MOSS-TTS-Local-Transformer-v1.5 is API-compatible with MOSS-TTS-Local-Transformer-v1.0. For continuation with prefix audio, detailed UserMessage and AssistantMessage fields, generation hyperparameters, Pinyin/IPA preprocessing examples, and evaluation results, see the MOSS-TTS-Local-Transformer-v1.0.
Citation
If you use this model, please cite the MOSS-TTS Technical Report.