Generate speech using the Xiaomi MiMo V2.5 TTS series models. Supports Chinese and English, preset voices, voice design, voice cloning, emotional styles, dialects, and singing.
Script directory:$SKILLS_PATH/mimo-v2-5-tts/scripts/
$SKILLS_PATHNote: The skills directory path varies depending on the deployment environment.
Model selection
The V2.5 series provides three models; choose according to the use case:
| Model ID | Purpose | Voice source | Special capability |
|---|---|---|---|
mimo-v2.5-tts |
Preset voice speech synthesis | Built-in premium voices | Supports singing |
mimo-v2.5-tts-voicedesign |
Custom voice from text description | Generated from text description | — |
mimo-v2.5-tts-voiceclone |
Voice replicated from audio samples | Audio samples | — |
Selection suggestions:
- Need to quickly generate speech, need singing functionality →
mimo-v2.5-tts(preset voices) - Need a unique voice →
mimo-v2.5-tts-voicedesign(generated from text description) - Need to imitate a specific voice →
mimo-v2.5-tts-voiceclone(replicated from audio samples)
Note: TTS has randomness; the same input may produce different results, so when the user needs it, you can generate several times for them to choose from.
Environment dependencies
| Environment variable | Description | Required |
|---|---|---|
MIMO_API_KEY |
MiMo API key (obtained from the MiMo open platform) | Yes |
| Dependency | Description | Required |
|---|---|---|
python3 |
Run scripts | Yes |
openai |
pip install openai |
Yes |
ffmpeg |
Format conversion, long text segmentation and concatenation | Used only for conversion and concatenation scenarios |
curl |
Call Feishu API | Used only for Feishu sending |
Preset voices
When using the mimo-v2.5-tts model, a voice must be explicitly specified. You can remind the user which voices are available, or choose a suitable voice based on the content language and style.
| Voice name | Voice ID | Language | Gender | Style |
|---|---|---|---|---|
| Bingtang | 冰糖 |
Chinese | Female | Lively young girl |
| Moli | 茉莉 |
Chinese | Female | Intellectual female voice |
| Suda | 苏打 |
Chinese | Male | Sunny boy |
| Baihua | 白桦 |
Chinese | Male | Mature male voice |
| Mia | Mia |
English | Female | Lively girl |
| Chloe | Chloe |
English | Female | Sweet Dreamy |
| Milo | Milo |
English | Male | Sunny boy |
| Dean | Dean |
English | Male | Steady Gentle |
Natural language control
All models support natural language control.
Through natural language descriptions, the model understands and generates speech in the corresponding style. All models can pass natural language control instructions through the --context parameter:mimo-v2.5-tts and mimo-v2.5-tts-voiceclone Can be used to adjust the tone, emotion, and other style aspects for a specified timbre;mimo-v2.5-tts-voicedesign then this option controls both timbre and style simultaneously.
Capability features:
- Multi-style switching: complete style transitions from narration → whisper → scream within the same speech segment
- Multi-emotion blending: supports compound emotions such as "suppressed anger" and "choked-up laughter"
- Multi-granularity control: paragraph-level → sentence-level → word-level → character-level can all be specified
Example:
用轻快上扬的语调向领导报喜,语速稍快,带着查到成绩后压抑不住的激动与小骄傲,声音明亮有活力。
看着刚解决的难题成果忍不住得意忘形地惊呼,声音高亢明亮,语速偏快,语气中带着满满的自信与难以置信。
Director mode
A special use of natural language control is "director mode," which comprehensively portrays characters and voices from three dimensions: character, scene, and direction:
- [Character] personal identity, personality foundation, appearance and temperament, and speaking habits
- [Scene] what is happening right now, who is being spoken to, emotional position
- [Direction] speech rate, breath, pauses, stress, resonance placement, timbre texture, emotional fluctuations
Director mode example:
角色:百年门阀岑家的现任大当家。自出生便被过继给祖庙的守门老人抚养,被塑造成一尊完美无瑕、绝情断欲的家族图腾。常年深居简出,对人有着极强的阶级疏离感。
场景:在祠堂的阴影里,看着那个不顾一切冲破保安防线来找她、企图带她私奔的男人。她要用最冷硬的阶级壁垒,绞杀对方,也绞杀自己刚刚萌芽、却足以燎原的感情。
指导:
冰冷、慵懒却极具威压的低音御姐。发声通道非常松弛,没有任何剑拔弩张,却有着让人骨里生寒的压迫感。
- 语速与顿挫:极慢,每个字都像是在舌尖滚过才吐出来,带着上位者漫不经心的傲慢。句与句之间留下极长的、令人不安的空白。
- 气声与实声:大部分时间,她的声音没有明显的声调起伏,实音重且硬,像是一条平缓却冰冷的暗河。但一定要在某些尾音处(如“真心”),加入极其轻微的气音收束,透出一丝连她自己都没察觉到的疲惫与渴望。
- 咬字肌理:文白杂糅的用词带着旧时代的痕迹,唇齿音发得极轻但极清晰(如“冲撞”“廉价”),显得既清雅又锋利,刀刀见血。
Director mode is suitable for scenarios with high requirements for vocal performance, such as character dubbing and film-grade content generation.
Audio tag control
mimo-v2.5-tts and mimo-v2.5-tts-voiceclone support audio tag control.mimo-v2.5-tts-voicedesign does not currently support it; if you need to control style, please use --context to write a more detailed description.
Use parentheses anywhere in the text to describe tone, emotion, or actions that can produce sound, enabling intra-sentence switching. The content inside the parentheses must be sound-related (such as tone, emotion, sighing, yawning, coughing) and cannot be physical actions (such as turning around, sitting down, waving).
Chinese supports full-width (), half-width (), and square brackets [] , three types of brackets; English supports half-width ()and square brackets [] , two types of brackets.
(紧张,深呼吸)呼……冷静,冷静。不就是一个面试吗……(语速加快,碎碎念)自我介绍已经背了五十遍了,应该没问题的。加油,你可以的……(小声)哎呀,领带歪没歪?
(极其疲惫,有气无力)师傅……到地方了叫我一声……(长叹一口气)我先眯一会儿,这班加得我魂儿都要散了。
如果我当时……(沉默片刻)哪怕再坚持一秒钟,结果是不是就不一样了?(苦笑)呵,没如果了。
(寒冷导致的急促呼吸)呼——呼——这、这大兴安岭的雪……(咳嗽)简直能把人骨头冻透了……别、别停下,走,快走。
(提高音量喊话)大姐!这鱼新鲜着呢!早上刚捞上来的!哎!那个谁,别乱翻,压坏了你赔啊?!
Achoo! Ahem. I—I really (cough) think I am coming down with a terrible (cough) terrible cold.
(heavy breathing) Just... give me... a second. I ran... all the way... from the station.
I just feel... long sigh... like I'm constantly treading water, you know?
It's just so stupid! (sobbing) We spent all that money on the cake and the dog just... (sudden laugh) he just ate the whole thing in one bite!
Parentheses can be placed atany positionin the text (beginning, middle, or end all work), and can describe: tone, emotion, breathing, laughter, crying, panting, coughing, yawning, sighing, and other sound-producing content. Note that physical actions (such as turning around, sitting down, waving) cannot be written.
Overall style tag
The overall style tag is a case of audio tag control. Add a (风格) tag at the beginning of the target text to specify the pronunciation style of the entire speech segment.
Format example:(风格1 风格2)待合成内容
Singing: the (唱歌) tag must be added at the very beginning, in the format:(唱歌)歌词. The identifiers supported within the tag include:唱歌、sing、singing。
| Category | Common styles |
|---|---|
| Basic emotions | 开心 悲伤 愤怒 恐惧 惊讶 兴奋 委屈 平静 冷漠 |
| Compound emotions | 怅然 欣慰 无奈 愧疚 释然 嫉妒 厌倦 忐忑 动情 |
| Overall intonation | 温柔 高冷 活泼 严肃 慵懒 俏皮 深沉 干练 凌厉 |
| Timbre positioning | 磁性 醇厚 清亮 空灵 稚嫩 苍老 甜美 沙哑 醇雅 |
| Persona tone | 夹子音 御姐音 正太音 大叔音 台湾腔 |
| Dialect | 东北话 四川话 河南话 粤语 |
| Role-playing | 孙悟空 林黛玉 |
| Singing | 唱歌 |
Classic combinations: (怅然) 这么多年过去了...、(慵懒) 再让我睡五分钟...、(磁性) 夜已经深了...、(东北话) 哎呀妈呀...、(粤语) 呢个真係好正啊...
Writing timbre descriptions
When using mimo-v2.5-tts-voicedesign to customize timbre through text descriptions, you need to write a short timbre description to guide the model in generating a voice that matches the expected traits, sharing the --context parameter input with natural language control. The requirements for writing timbre descriptions are as follows:
The voice description is the ID card of the voice. Describe only what this voice itself sounds like—do not write the scene, do not write actions, do not write what is to be said this time. The more concise it is, the easier it is to reuse across scenes.
Required items:
- Identity anchor: Age range + gender. Determines the fundamental frequency and is the basis of all traits.
- Voice texture: Breath direction, resonance placement, articulation, and tonal undertone. Use perceptible verbs or metaphors; do not pile up adjectives.
- Speech rate and rhythm: Steady / fast / slow / alternately fast and slow / rapid-fire with pauses and cadence.
- Emotional undertone: The default state of the voice (high-pitched / relaxed / warm and soft / restrained).
Optional items (strongly recommended):
- Style/identity label: A passing mention of an occupation or style anchor that the model understands instantly. Example: auctioneer style / food critic style / announcer style / courtroom statement style.
- Signature quirk: A habit that makes people remember it in one listen. Example: occasionally closes eyes and inhales / tremolo at the end of words / laughs with a chesty chuckle.
Hard constraints:
- One to two sentences, plain descriptive style, no paragraphs, no bullet points.
- Do not write the scene ("at a press conference" "on night shift").
- Do not write actions ("she walks onto the stage").
- Do not use real actors' or IP character names (copyright + poor generalization).
- Default to Mandarin or English; add dialect only when clearly needed.
Voice description examples:
中年男性,节奏极快,情绪高亢,拍卖师风格。吐字连珠,带抑扬顿挫与紧迫感。
青年男性,电竞解说风格,语速极快且连贯,带明显气口和爆发性强调,兴奋时声音上扬尖锐。
中年男性,法庭陈词风格,声线沉稳偏正式,吐字工整字字顿挫,情绪克制但每个词都很重。
Content and tag enhancement
When the user does not directly provide the text to be read, you should write the text to be synthesized yourself according to the specific situation, such as role-play or creative work.
When the user only provides the text to be read without tone or emotional details, you should fine-tune the text and insert appropriate tags according to the actual situation.
Hard rules:
- The text emotion must match the voice undertone. A warm and soft grandma does not roar; an auctioneer does not do a late-night monologue.
- Length 2–5 sentences, one whole paragraph. Too short and the model cannot establish the rhythm, and subtle voice traits cannot come through either.
- Tags are seasoning, not the main dish. Pause when it should pause, laugh when it should laugh; do not pile them up. At most one tag per sentence.
- Punctuation has performative meaning: Ellipsis = pause / em dash = being interrupted or extended sound / ALL CAPS = emphasis.
- Tag language follows the main text. Chinese text with Chinese tags, English text with English tags; mixing is prohibited.
Recommended tags (for Chinese use [标签]):
| Category | Common tags |
|---|---|
| Rhythm | [停顿] [长停顿] [急促] [拖音] [语速加快] [语速放缓] |
| Emotion | [轻声] [低语] [叹气] [吸气] [哽咽] [强调] [笑] [爽朗大笑] |
| Other | [欲言又止] [碎碎念] [沉默片刻] |
Recommended tags (for English use [tag]):
| Category | Common Tags |
|---|---|
| Pacing | [pause] [long pause] [fast] [slow] [drawn out] |
| Emotion | [whispering] [sighs] [inhale] [choked up] [emphasis] [laughs] [hearty laugh] |
Pairing examples:
音色:中年女性,美食评论家风格,语调绵柔富感染力,描述时带夸张的回味与陶醉感,偶尔闭眼吸气。
文本:
[吸气]唔——这一口下去…[停顿]整个舌尖都被包住了。[拖音]先是焦糖的甜,紧接着[强调]一点点[停顿]刚好的咸,在后味里慢慢铺开。[叹气]说真的,我已经[轻声]好久[停顿]没吃到这么用心的甜点了。
音色:高龄女性,声音温软缓慢,带点颤音和慈祥感,像奶奶在哄小孙辈睡前讲故事。
文本:
[轻声]来,躺好。[停顿]奶奶给你讲个故事啊。[长停顿]从前啊,山脚下有一间小木屋…[拖音]住着一只小兔子。[叹气]这只兔子呀,特别贪玩,每天太阳一出来就往外跑。[停顿]结果有一天——[强调]下雨了。[低语]它迷路了,怎么都找不到回家的路…
Python script usage
The three models correspond to three scripts respectively; choose according to your needs:
| Script | Model | Purpose |
|---|---|---|
mimo_tts.py |
mimo-v2.5-tts |
Preset voice speech synthesis |
mimo_tts_voicedesign.py |
mimo-v2.5-tts-voicedesign |
Text-description customized voice |
mimo_tts_voiceclone.py |
mimo-v2.5-tts-voiceclone |
Audio-sample voice cloning |
Preset voice speech synthesis (mimo_tts.py)
python3 $SKILLS_PATH/mimo-v2-5-tts/scripts/mimo_tts.py \
--text "你好,今天天气真不错。" \
--voice "冰糖"
Preset voice + natural language style control
python3 $SKILLS_PATH/mimo-v2-5-tts/scripts/mimo_tts.py \
--context "用温柔的语气,语速稍慢" \
--text "没关系,慢慢来,我等你。" \
--voice "冰糖" \
--output tmp/mimo-v2.5-tts/comfort.wav
Preset voices + audio tag control
python3 $SKILLS_PATH/mimo-v2-5-tts/scripts/mimo_tts.py \
--text "(紧张,深呼吸)呼……冷静,冷静。不就是一个面试吗……(小声)哎呀,领带歪没歪?" \
--voice "冰糖" \
--output tmp/mimo-v2.5-tts/interview.wav
Voice design (mimo_tts_voicedesign.py)
python3 $SKILLS_PATH/mimo-v2-5-tts/scripts/mimo_tts_voicedesign.py \
--context "Give me a young male tone." \
--text "Yes, I had a sandwich." \
--output tmp/mimo-v2.5-tts/voicedesign.wav
Tip: You can save the audio generated by Voice Design and later use it as the
mimo_tts_voiceclone.pyinput for--voice-file, implementing a "design → clone" workflow: first use a text description (--context) to generate a satisfactory voice, then use that audio as a sample to clone onto other text. When cloning, you can also add director mode instructions via--context.
Voice cloning (mimo_tts_voiceclone.py)
Note: The Base64-encoded voice sample must not exceed 10 MB, and only mp3 and wav formats are supported.
python3 $SKILLS_PATH/mimo-v2-5-tts/scripts/mimo_tts_voiceclone.py \
--voice-file voice.mp3 \
--text "Yes, I had a sandwich." \
--output tmp/mimo-v2.5-tts/voiceclone.wav
Voice cloning + director mode
python3 $SKILLS_PATH/mimo-v2-5-tts/scripts/mimo_tts_voiceclone.py \
--voice-file voice.mp3 \
--context "用温柔的语气,语速稍慢" \
--text "没关系,慢慢来,我等你。" \
--output tmp/mimo-v2.5-tts/voiceclone_director.wav
Singing
Note: The singing lyrics must be complete; incomplete lyrics will cause off-key singing and poor results.
python3 $SKILLS_PATH/mimo-v2-5-tts/scripts/mimo_tts.py \
--text "(唱歌)原谅我这一生不羁放纵爱自由,也会怕有一天会跌倒,Oh no。背弃了理想,谁人都可以,哪会怕有一天只你共我。" \
--voice "冰糖" \
--output tmp/mimo-v2.5-tts/singing.wav
English + audio tags
python3 $SKILLS_PATH/mimo-v2-5-tts/scripts/mimo_tts.py \
--text "I just... (sighs deeply) I don't know anymore. (suddenly firm) But I won't give up!" \
--voice "Mia" \
--output tmp/mimo-v2.5-tts/english.wav
Long text handling
V2.5 has good support for long text,it is recommended to generate in one go for almost all scenarios, with no need for manual segmentation. Only when the text exceeds 2500 charactersshould you consider segmented synthesis followed by concatenation.
Segmented synthesis method: split naturally by periods/paragraphs, generate each segment as an independent wav, then concatenate with ffmpeg:
# 创建文件列表
echo "file '/tmp/mimo-v2.5-tts/part1.wav'" > /tmp/mimo-v2.5-tts/list.txt
echo "file '/tmp/mimo-v2.5-tts/part2.wav'" >> /tmp/mimo-v2.5-tts/list.txt
# 拼接
ffmpeg -y -f concat -safe 0 -i /tmp/mimo-v2.5-tts/list.txt -c copy /tmp/mimo-v2.5-tts/combined.wav
Sending Feishu voice messages
Note: This feature is only needed when the user wants to send TTS-generated speech to Feishu.
Send the TTS-generated WAV to Feishu, completing it in one command: generate → transcode → upload → send.
Why not use the message tool: Feishu voice messages require calling the
/im/v1/messagesAPI (msg_type: audio), and the audio must first be uploaded to obtain thefile_key. The message tool of many tools (asVoice: true) does not implement this logic on the Feishu channel and will send the audio as a regular attachment (the user sees a file rather than a voice message).feishu_send_audio.shcompletes the full upload + send process and cannot be replaced by the message tool.
Environment dependencies
| Environment variable | Source | Description |
|---|---|---|
FEISHU_APP_ID |
Feishu Open Platform | App ID |
FEISHU_APP_SECRET |
Feishu Open Platform | App Secret |
| Dependency | Description | Required |
|---|---|---|
ffmpeg |
WAV to Opus, get audio duration | Yes |
curl |
Call Feishu API | Yes |
Usage
Private chat send (open_id)
# 1. 生成语音
python3 $SKILLS_PATH/mimo-v2-5-tts/scripts/mimo_tts.py \
--text "好的,马上就好!" \
--voice "冰糖" \
--output /tmp/mimo-v2.5-tts/voice.wav
# 2. 发送到飞书私聊(receive_id_type 为 open_id,receive_id 为用户 ID)
bash $SKILLS_PATH/mimo-v2-5-tts/scripts/feishu_send_audio.sh /tmp/mimo-v2.5-tts/voice.wav open_id ou_xxxxxx
Group chat send (chat_id)
# 1. 生成语音
python3 $SKILLS_PATH/mimo-v2-5-tts/scripts/mimo_tts.py \
--text "大家好,今天天气真不错!" \
--voice "冰糖" \
--output /tmp/mimo-v2.5-tts/voice.wav
# 2. 发送到飞书群聊(receive_id_type 为 chat_id,receive_id 为群 ID)
bash $SKILLS_PATH/mimo-v2-5-tts/scripts/feishu_send_audio.sh /tmp/mimo-v2.5-tts/voice.wav chat_id oc_xxxxxx
feishu_send_audio.sh Internal process:wav → opus (ffmpeg) → 获取 tenant_access_token → 上传音频文件 → 发送 audio 消息。