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.
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 静夜思.
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.
We recommend a clean, isolated Python environment with Transformers 5.0.0, or a recent Transformers version with Qwen3 support, to avoid dependency conflicts.
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.
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.
curl -X POST http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{"input": "SGLang-Omni is a great project!"}' \
--output output.wav
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.
curl -X POST http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "SGLang-Omni is a great project!",
"references": [{
"audio_path": "https://huggingface.co/datasets/zhaochenyang20/seed-tts-eval-mini/resolve/main/en/prompt-wavs/common_voice_en_10119832.wav"
}]
}' \
--output output.wav
ref_audio and ref_text are accepted as shorthand for references[0].audio_path and references[0].text.
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:
curl -N -X POST http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "Get the trust fund to the bank early.",
"ref_audio": "https://huggingface.co/datasets/zhaochenyang20/seed-tts-eval-mini/resolve/main/en/prompt-wavs/common_voice_en_10119832.wav",
"stream": true,
"response_format": "pcm",
"stream_format": "audio"
}' \
| ffmpeg -f s16le -ar 48000 -ac 1 -i pipe:0 output_stream.wav
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.
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.