MOSS‑TTS Family is an open‑source speech and sound generation model family from MOSI.AI and the OpenMOSS team. It is designed for high‑fidelity, high‑expressiveness, and complex real‑world scenarios, covering stable long‑form speech, multi‑speaker dialogue, voice/character design, environmental sound effects, and real‑time streaming TTS.
Introduction
When a single piece of audio needs to sound like a real person, pronounce every word accurately, switch speaking styles across content, remain stable over tens of minutes, and support dialogue, role‑play, and real‑time interaction, a single TTS model is often not enough. The MOSS‑TTS Family breaks the workflow into five production‑ready models that can be used independently or composed into a complete pipeline.
MOSS‑TTS: The flagship production model featuring high fidelity and optimal zero-shot voice cloning. It supports long-speech generation, fine-grained control over Pinyin, phonemes, and duration, as well as multilingual/code-switched synthesis.
MOSS‑TTSD: A spoken dialogue generation model for expressive, multi-speaker, and ultra-long dialogues. The new v1.0 version achieves industry-leading performance on objective metrics and outperformed top closed-source models like Doubao and Gemini 2.5-pro in subjective evaluations. You can visit the MOSS-TTSD repository for details.
MOSS‑VoiceGenerator: An open-source voice design model capable of generating diverse voices and styles directly from text prompts, without any reference speech. It unifies voice design, style control, and synthesis, functioning independently or as a design layer for downstream TTS. Its performance surpasses other top-tier voice design models in arena ratings.
MOSS‑TTS‑Realtime: A multi-turn context-aware model for real-time voice agents. It uses incremental synthesis to ensure natural and coherent replies, making it ideal for building low-latency voice agents when paired with text models. The TTFB (Time To First Byte) of MOSS-TTS-Realtime reaches 180 ms, and the $T_{\text{LLM-first-sentence}} + T_{\text{MOSS-TTS-Realtime-TTFB}}$ is 377 ms.
MOSS‑SoundEffect: A content creation model specialized in sound effect generation with wide category coverage and controllable duration. It generates audio for natural environments, urban scenes, biological sounds, human actions, and musical fragments, suitable for film, games, and interactive experiences.
Model Architecture
We train MossTTSDelay and MossTTSLocal as complementary baselines under one training/evaluation setup: Delay emphasizes long-context stability, inference speed, and production readiness, while Local emphasizes lightweight flexibility and strong objective performance for streaming-oriented systems. Together they provide reproducible references for deployment and research.
MossTTSRealtime is not a third comparison baseline; it is a capability-driven design for voice agents. By modeling multi-turn context from both prior text and user acoustics, it delivers low-latency streaming speech that stays coherent and voice-consistent across turns.
Architecture
Core Mechanism
Arch Details
MossTTSDelay
Multi‑head parallel RVQ prediction with delay‑pattern scheduling
MOSS-TTS, MOSS-TTSD and MOSS-TTS-Realtime currently supports 20 languages:
Language
Code
Flag
Language
Code
Flag
Language
Code
Flag
Chinese
zh
🇨🇳
English
en
🇺🇸
German
de
🇩🇪
Spanish
es
🇪🇸
French
fr
🇫🇷
Japanese
ja
🇯🇵
Italian
it
🇮🇹
Hungarian
hu
🇭🇺
Korean
ko
🇰🇷
Russian
ru
🇷🇺
Persian (Farsi)
fa
🇮🇷
Arabic
ar
🇸🇦
Polish
pl
🇵🇱
Portuguese
pt
🇵🇹
Czech
cs
🇨🇿
Danish
da
🇩🇰
Swedish
sv
🇸🇪
Greek
el
🇬🇷
Turkish
tr
🇹🇷
MOSS-TTS
1. Overview
1.1 TTS Family Positioning
MOSS-TTS is the flagship base model in our open-source TTS Family. It is designed as a production-ready synthesis backbone that can serve as the primary high-quality engine for scalable voice applications, and as a strong research baseline for controllable TTS and discrete audio token modeling.
Design goals
Production readiness: robust voice cloning with stable, on-brand speaker identity at scale
Controllability: duration and pronunciation controls that integrate into real workflows
Long-form stability: consistent identity and delivery for extended narration
Multilingual coverage: multilingual and code-switched synthesis as first-class capabilities
1.2 Key Capabilities
MOSS-TTS delivers state-of-the-art quality while providing the fine-grained controllability and long-form stability required for production-grade voice applications, from zero-shot cloning and hour-long narration to token- and phoneme-level control across multilingual and code-switched speech.
State-of-the-art evaluation performance — top-tier objective and subjective results across standard TTS benchmarks and in-house human preference testing, validating both fidelity and naturalness.
Zero-shot Voice Cloning (Voice Clone) — clone a target speaker’s timbre (and part of speaking style) from short reference audio, without speaker-specific fine-tuning.
Ultra-long Speech Generation (up to 1 hour) — support continuous long-form speech generation for up to one hour in a single run, designed for extended narration and long-session content creation.
Token-level Duration Control — control pacing, rhythm, pauses, and speaking rate at token resolution for precise alignment and expressive delivery.
Phoneme-level Pronunciation Control — supports:
pure Pinyin input
pure IPA phoneme input
mixed Chinese / English / Pinyin / IPA input in any combination
Multilingual support — high-quality multilingual synthesis with robust generalization across languages and accents.
Code-switching — natural mixed-language generation within a single utterance (e.g., Chinese–English), with smooth transitions, consistent speaker identity, and pronunciation-aware rendering on both sides of the switch.
1.3 Model Architecture
MOSS-TTS includes two complementary architectures, both trained and released to explore different performance/latency tradeoffs and to support downstream research.
Architecture A: Delay Pattern (MossTTSDelay)
Single Transformer backbone with (n_vq + 1) heads.
Uses delay scheduling for multi-codebook audio tokens.
Strong long-context stability, efficient inference, and production-friendly behavior.
Architecture B: Global Latent + Local Transformer (MossTTSLocal)
Backbone produces a global latent per time step.
A lightweight Local Transformer emits a token block per step.
Streaming-friendly with simpler alignment (no delay scheduling).
Why train both?
Exploration of architectural potential and validation across multiple generation paradigms.
Different tradeoffs: Delay pattern tends to be faster and more stable for long-form synthesis; Local is smaller and excels on objective benchmarks.
Open-source value: two strong baselines for research, ablation, and downstream innovation.
Recommended for production. Faster inference, stronger long-context stability, and robust voice cloning quality. Best for large-scale deployment and long-form narration.
MossTTSLocal-1.7B
Recommended for evaluation and research. Smaller model size with SOTA objective metrics. Great for quick experiments, ablations, and academic studies.
Recommended decoding hyperparameters (per model)
Model
audio_temperature
audio_top_p
audio_top_k
audio_repetition_penalty
MOSS-TTSDelay-8B
1.7
0.8
25
1.0
MOSS-TTSLocal-1.7B
1.0
0.95
50
1.1
Note: max_new_tokens controls duration. At 12.5 tokens per second, 1s ≈ 12.5 tokens.
2. Quick Start
Environment Setup
We recommend a clean, isolated Python environment with Transformers 5.0.0 to avoid dependency conflicts.
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: For evaluation and research purposes, we recommend using MOSS-TTSLocal-1.7B.
MOSS-TTS provides a convenient generate interface for rapid usage. The examples below cover:
Direct generation (Chinese / English / Pinyin / IPA)
Voice cloning
Duration control
python
1import importlib.util
2from pathlib import Path
3import torch
4import torchaudio
5from transformers import AutoModel, AutoProcessor, GenerationConfig
6# Disable the broken cuDNN SDPA backend7torch.backends.cuda.enable_cudnn_sdp(False)8# Keep these enabled as fallbacks9torch.backends.cuda.enable_flash_sdp(True)10torch.backends.cuda.enable_mem_efficient_sdp(True)11torch.backends.cuda.enable_math_sdp(True)1213pretrained_model_name_or_path ="OpenMOSS-Team/MOSS-TTS-Local-Transformer"14device ="cuda"if torch.cuda.is_available()else"cpu"15dtype = torch.bfloat16 if device =="cuda"else torch.float32
1617defresolve_attn_implementation()->str:18# Prefer FlashAttention 2 when package + device conditions are met.19if(20 device =="cuda"21and importlib.util.find_spec("flash_attn")isnotNone22and dtype in{torch.float16, torch.bfloat16}23):24 major, _ = torch.cuda.get_device_capability()25if major >=8:26return"flash_attention_2"2728# CUDA fallback: use PyTorch SDPA kernels.29if device =="cuda":30return"sdpa"3132# CPU fallback.33return"eager"343536attn_implementation = resolve_attn_implementation()37print(f"[INFO] Using attn_implementation={attn_implementation}")3839processor = AutoProcessor.from_pretrained(40 pretrained_model_name_or_path,41 trust_remote_code=True,42)43processor.audio_tokenizer = processor.audio_tokenizer.to(device)4445text_1 ="""亲爱的你,
46你好呀。
4748今天,我想用最认真、最温柔的声音,对你说一些重要的话。
49这些话,像一颗小小的星星,希望能在你的心里慢慢发光。
5051首先,我想祝你——
52每天都能平平安安、快快乐乐。
5354希望你早上醒来的时候,
55窗外有光,屋子里很安静,
56你的心是轻轻的,没有着急,也没有害怕。
57"""58text_2 ="""We stand on the threshold of the AI era.
59Artificial intelligence is no longer just a concept in laboratories, but is entering every industry, every creative endeavor, and every decision. It has learned to see, hear, speak, and think, and is beginning to become an extension of human capabilities. AI is not about replacing humans, but about amplifying human creativity, making knowledge more equitable, more efficient, and allowing imagination to reach further. A new era, jointly shaped by humans and intelligent systems, has arrived."""60text_3 ="nin2 hao3,qing3 wen4 nin2 lai2 zi4 na3 zuo4 cheng2 shi4?"61text_4 ="nin2 hao3,qing4 wen3 nin2 lai2 zi4 na4 zuo3 cheng4 shi3?"62text_5 ="您好,请问您来自哪 zuo4 cheng2 shi4?"63text_6 ="/həloʊ, meɪ aɪ æsk wɪtʃ sɪti juː ɑːr frʌm?/"6465# Use audio from ./assets/audio to avoid downloading from the cloud.66ref_audio_1 ="https://speech-demo.oss-cn-shanghai.aliyuncs.com/moss_tts_demo/tts_readme_demo/reference_zh.wav"67ref_audio_2 ="https://speech-demo.oss-cn-shanghai.aliyuncs.com/moss_tts_demo/tts_readme_demo/reference_en.m4a"6869conversations =[70# Direct TTS (no reference)71[72 processor.build_user_message(text=text_1)73],74[75 processor.build_user_message(text=text_2)76],77# Pinyin or IPA input78[79 processor.build_user_message(text=text_3)80],81[82 processor.build_user_message(text=text_4)83],84[85 processor.build_user_message(text=text_5)86],87[88 processor.build_user_message(text=text_6)89],90# Voice cloning (with reference)91[92 processor.build_user_message(text=text_1, reference=[ref_audio_1])93],94[95 processor.build_user_message(text=text_2, reference=[ref_audio_2])96],97]9899model = AutoModel.from_pretrained(100 pretrained_model_name_or_path,101 trust_remote_code=True,102 attn_implementation=attn_implementation,103 torch_dtype=dtype,104).to(device)105model.eval()106107batch_size =1108109save_dir = Path(f"inference_root_moss_tts_local_transformer_generation")110save_dir.mkdir(exist_ok=True, parents=True)111sample_idx =0112with torch.no_grad():113for start inrange(0,len(conversations), batch_size):114 batch_conversations = conversations[start : start + batch_size]115 batch = processor(batch_conversations, mode="generation")116 input_ids = batch["input_ids"].to(device)117 attention_mask = batch["attention_mask"].to(device)118119 outputs = model.generate(120 input_ids=input_ids,121 attention_mask=attention_mask,122 max_new_tokens=4096,123)124125for message in processor.decode(outputs):126 audio = message.audio_codes_list[0]127 out_path = save_dir /f"sample{sample_idx}.wav"128 sample_idx +=1129 torchaudio.save(out_path, audio.unsqueeze(0), processor.model_config.sampling_rate)
MOSS-TTS supports continuation-based cloning: provide a prefix audio clip in the assistant message, and make sure the prefix transcript is included in the text. The model continues in the same speaker identity and style.
python
1import importlib.util
2from pathlib import Path
3import torch
4import torchaudio
5from transformers import AutoModel, AutoProcessor, GenerationConfig
6# Disable the broken cuDNN SDPA backend7torch.backends.cuda.enable_cudnn_sdp(False)8# Keep these enabled as fallbacks9torch.backends.cuda.enable_flash_sdp(True)10torch.backends.cuda.enable_mem_efficient_sdp(True)11torch.backends.cuda.enable_math_sdp(True)1213pretrained_model_name_or_path ="OpenMOSS-Team/MOSS-TTS-Local-Transformer"14device ="cuda"if torch.cuda.is_available()else"cpu"15dtype = torch.bfloat16 if device =="cuda"else torch.float32
1617defresolve_attn_implementation()->str:18# Prefer FlashAttention 2 when package + device conditions are met.19if(20 device =="cuda"21and importlib.util.find_spec("flash_attn")isnotNone22and dtype in{torch.float16, torch.bfloat16}23):24 major, _ = torch.cuda.get_device_capability()25if major >=8:26return"flash_attention_2"2728# CUDA fallback: use PyTorch SDPA kernels.29if device =="cuda":30return"sdpa"3132# CPU fallback.33return"eager"343536attn_implementation = resolve_attn_implementation()37print(f"[INFO] Using attn_implementation={attn_implementation}")3839processor = AutoProcessor.from_pretrained(40 pretrained_model_name_or_path,41 trust_remote_code=True,42)43processor.audio_tokenizer = processor.audio_tokenizer.to(device)4445text_1 ="""亲爱的你,
46你好呀。
4748今天,我想用最认真、最温柔的声音,对你说一些重要的话。
49这些话,像一颗小小的星星,希望能在你的心里慢慢发光。
5051首先,我想祝你——
52每天都能平平安安、快快乐乐。
5354希望你早上醒来的时候,
55窗外有光,屋子里很安静,
56你的心是轻轻的,没有着急,也没有害怕。
57"""5859ref_text_1 ="太阳系八大行星之一。"60# Use audio from ./assets/audio to avoid downloading from the cloud.61ref_audio_1 ="https://speech-demo.oss-cn-shanghai.aliyuncs.com/moss_tts_demo/tts_readme_demo/reference_zh.wav"6263conversations =[64# Continuatoin only65[66 processor.build_user_message(text=ref_text_1 + text_1),67 processor.build_assistant_message(audio_codes_list=[ref_audio_1])68],69]7071model = AutoModel.from_pretrained(72 pretrained_model_name_or_path,73 trust_remote_code=True,74 attn_implementation=attn_implementation,75 torch_dtype=dtype,76).to(device)77model.eval()7879batch_size =18081save_dir = Path("inference_root_moss_tts_local_transformer_continuation")82save_dir.mkdir(exist_ok=True, parents=True)83sample_idx =084with torch.no_grad():85for start inrange(0,len(conversations), batch_size):86 batch_conversations = conversations[start : start + batch_size]87 batch = processor(batch_conversations, mode="continuation")88 input_ids = batch["input_ids"].to(device)89 attention_mask = batch["attention_mask"].to(device)9091 outputs = model.generate(92 input_ids=input_ids,93 attention_mask=attention_mask,94 max_new_tokens=4096,95)9697for message in processor.decode(outputs):98 audio = message.audio_codes_list[0]99 out_path = save_dir /f"sample{sample_idx}.wav"100 sample_idx +=1101 torchaudio.save(out_path, audio.unsqueeze(0), processor.model_config.sampling_rate)
Input Types
UserMessage
Field
Type
Required
Description
text
str
Yes
Text to synthesize. Supports Chinese, English, German, French, Spanish, Japanese, Korean, etc. Can mix raw text with Pinyin or IPA for pronunciation control.
reference
List[str]
No
Reference audio for voice cloning. For current MOSS-TTS, one audio is expected in the list.
tokens
int
No
Expected number of audio tokens. 1s ≈ 12.5 tokens.
AssistantMessage
Field
Type
Required
Description
audio_codes_list
List[str]
Only for continuation
Prefix audio for continuation-based cloning. Use audio file paths or URLs.
Generation Hyperparameters (MOSS-TTS-Local)
MOSS-TTSLocal utilizes DelayGenerationConfig to manage hierarchical sampling. Due to the Progressive Sequence Dropout training mechanism, the model supports variable bitrate inference by adjusting the RVQ depth.
Parameter
Type
Recommended (Audio Layers)
Description
max_new_tokens
int
—
Controls total generated audio tokens. 1s ≈ 12.5 tokens.
n_vq_for_inference
int
32
RVQ Inference Depth: Controls the number of codebook layers generated. Higher values (max 32) improve audio fidelity but slow down inference; lower values speed up inference but reduce audio quality.
audio_temperature
float
1.0
Temperature for audio token layers (Layer 1+). Lower values ensure more stable and consistent acoustic reconstruction.
audio_top_p
float
0.95
Nucleus sampling cutoff for audio layers.
audio_top_k
int
50
Top-K sampling filter for audio layers.
audio_repetition_penalty
float
1.1
Discourages repeating acoustic patterns. Values > 1.0 help prevent artifacts in long-form synthesis.
Pinyin Input
Use tone-numbered Pinyin such as ni3 hao3 wo3 men1. You can convert Chinese text with pypinyin, then adjust tones for pronunciation control.
python
1import re
2from pypinyin import pinyin, Style
34CN_PUNCT =r",。!?;:、()“”‘’"567deffix_punctuation_spacing(s:str)->str:8 s = re.sub(rf"\s+([{CN_PUNCT}])",r"\1", s)9 s = re.sub(rf"([{CN_PUNCT}])\s+",r"\1", s)10return s
111213defzh_to_pinyin_tone3(text:str, strict:bool=True)->str:14 result = pinyin(15 text,16 style=Style.TONE3,17 heteronym=False,18 strict=strict,19 errors="default",20)2122 s =" ".join(item[0]for item in result)23return fix_punctuation_spacing(s)2425text = zh_to_pinyin_tone3("您好,请问您来自哪座城市?")26print(text)2728# Expected: nin2 hao3,qing3 wen4 nin2 lai2 zi4 na3 zuo4 cheng2 shi4?29# Try: nin2 hao3,qing4 wen3 nin2 lai2 zi4 na4 zuo3 cheng4 shi3?
IPA Input
Use /.../ to wrap IPA sequences so they are distinct from normal text. You can use DeepPhonemizer to convert English paragraphs or words into IPA sequences.
python
1from dp.phonemizer import Phonemizer
23# Download a phonemizer checkpoint from https://public-asai-dl-models.s3.eu-central-1.amazonaws.com/DeepPhonemizer/en_us_cmudict_ipa_forward.pt4model_path ="<path-to-phonemizer-checkpoint>"5phonemizer = Phonemizer.from_checkpoint(model_path)67english_texts ="Hello, may I ask which city you are from?"8phoneme_outputs = phonemizer(9 english_texts,10 lang="en_us",11 batch_size=812)13model_input_text =f"/{phoneme_outputs}/"14print(model_input_text)1516# Expected: /həloʊ, meɪ aɪ æsk wɪtʃ sɪti juː ɑːr frʌm?/
3. Evaluation
MOSS-TTS achieved state-of-the-art results on the open-source zero-shot TTS benchmark Seed-TTS-eval, not only surpassing all open-source models but also rivaling the most powerful closed-source models.