TokenPAPATokenPAPA
User GuideAPI ReferenceAI ApplicationsBlog

Mimo TTS API Guide: How to Use Xiaomi Text-to-Speech, Voice Clone & Voice Design (2026)

Complete guide to Xiaomi Mimo TTS API on TokenPAPA. Code examples for text-to-speech, voice cloning from audio samples, and custom synthetic voice design. Free OpenAI-compatible TTS.

Mimo TTS API Guide: How to Use Xiaomi Text-to-Speech, Voice Clone & Voice Design

This guide covers everything you need to integrate Xiaomi's Mimo TTS models into your application. All three models are completely free on TokenPAPA.


Prerequisites

  • A TokenPAPA account (sign up free)
  • Your API key from the dashboard
  • Python 3.8+ with the OpenAI library
pip install openai

1. Basic Text-to-Speech (mimo-v2.5-tts)

The standard TTS model converts text to natural speech with multiple voice options.

from openai import OpenAI

client = OpenAI(
    base_url="https://tokenpapa.ai/v1",
    api_key="your-tokenpapa-key"
)

# Basic speech generation
response = client.audio.speech.create(
    model="mimo-v2.5-tts",
    voice="alloy",
    input="Welcome to TokenPAPA! Xiaomi Mimo TTS is fast and completely free.",
)

# Save as MP3
response.stream_to_file("welcome.mp3")
print("✅ Speech saved to welcome.mp3")
curl https://tokenpapa.ai/v1/audio/speech \
  -H "Authorization: Bearer *** \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mimo-v2.5-tts",
    "input": "Xiaomi Mimo TTS is completely free on TokenPAPA.",
    "voice": "alloy",
    "response_format": "mp3",
    "speed": 1.0
  }' \
  --output speech.mp3

Available Voice Options

VoiceDescription
alloyBalanced, neutral voice
echoDeeper, resonant tone
fableSoft, storytelling style
onyxDeep, authoritative voice
novaWarm, friendly female voice
shimmerClear, bright voice

Adjusting Speed and Format

response = client.audio.speech.create(
    model="mimo-v2.5-tts",
    voice="nova",
    input="This is a slower, clearer narration example.",
    speed=0.8,                 # Speed: 0.25 to 4.0
    response_format="wav",     # mp3, wav, flac, opus
)

2. Voice Cloning (mimo-v2.5-tts-voiceclone)

Clone any voice from an audio sample. The model learns the unique characteristics of a speaker's voice and can generate new speech that sounds like them.

How It Works

  1. Prepare your audio sample — a clean recording of 10–30 seconds of speech
  2. Send it to the voice clone model with the text you want spoken
  3. Receive the cloned voice output
import base64
from openai import OpenAI

client = OpenAI(
    base_url="https://tokenpapa.ai/v1",
    api_key="your-tokenpapa-key"
)

# Read the reference audio file
with open("reference_speech.mp3", "rb") as f:
    audio_bytes = f.read()

audio_base64 = base64.b64encode(audio_bytes).decode("utf-8")

# Generate speech in the cloned voice
response = client.audio.speech.create(
    model="mimo-v2.5-tts-voiceclone",
    voice="alloy",  # Not used by clone model
    input="This speech is in the cloned voice! Listen to how natural it sounds.",
    extra_body={
        "reference_audio": audio_base64,
    }
)

response.stream_to_file("cloned_output.mp3")

Tips for best voice clone quality:

  • Use a quiet recording environment (no background noise)
  • Keep samples between 10–30 seconds
  • Use a consistent speaking pace
  • Avoid multiple speakers in one sample
  • Higher quality input = better clone output

3. Voice Design (mimo-v2.5-tts-voicedesign)

Create entirely synthetic voices by describing the characteristics you want. No audio sample needed.

from openai import OpenAI

client = OpenAI(
    base_url="https://tokenpapa.ai/v1",
    api_key="your-tokenpapa-key"
)

# Design a custom voice by describing its characteristics
response = client.audio.speech.create(
    model="mimo-v2.5-tts-voicedesign",
    voice="alloy",
    input="Hello! I am a custom-designed voice created by Xiaomi Mimo.",
    extra_body={
        "voice_description": "A warm, friendly middle-aged male voice with a slight British accent. Calm and professional tone, suitable for corporate narration."
    }
)

response.stream_to_file("designed_voice.mp3")

Voice Design Parameters You Can Specify

ParameterExamples
Gendermale, female, neutral
Ageyoung, middle-aged, elderly
AccentBritish, American, neutral, Chinese
Tonewarm, professional, cheerful, serious, soothing
Styleconversational, authoritative, storytelling, instructional
Pitchlow, medium, high
Speedslow, normal, fast

4. Streaming Audio (Real-Time)

All three Mimo TTS models support real-time audio streaming. This is useful for voice assistants, real-time translation, and live narration.

from openai import OpenAI

client = OpenAI(
    base_url="https://tokenpapa.ai/v1",
    api_key="your-tokenpapa-key"
)

# Stream audio in real-time
with client.audio.speech.with_streaming_response.create(
    model="mimo-v2.5-tts",
    voice="alloy",
    input="This is streaming audio from Xiaomi Mimo TTS. It plays in real time.",
) as response:
    with open("streamed_speech.mp3", "wb") as f:
        for chunk in response.iter_bytes():
            f.write(chunk)

print("✅ Streaming complete")

5. Error Handling

from openai import OpenAI, APIError

client = OpenAI(
    base_url="https://tokenpapa.ai/v1",
    api_key="your-tokenpapa-key"
)

try:
    response = client.audio.speech.create(
        model="mimo-v2.5-tts",
        voice="alloy",
        input="Hello, world!",
    )
    response.stream_to_file("output.mp3")
    
except APIError as e:
    print(f"API Error: {e.status_code} - {e.message}")
except Exception as e:
    print(f"Error: {e}")

Quick Reference

ModelEndpointPurposeCost
mimo-v2.5-tts/v1/audio/speechStandard TTSFree
mimo-v2.5-tts-voiceclone/v1/audio/speechVoice cloningFree
mimo-v2.5-tts-voicedesign/v1/audio/speechVoice designFree

All models support: mp3, wav, flac, opus output formats. Streaming support: Yes (SSE-based).


Next Steps

  1. Sign up for TokenPAPA — free account, no Chinese phone needed
  2. Get your API key from the dashboard
  3. Try the code examples above — they cost nothing

Need help? The TokenPAPA API documentation covers every endpoint in detail.

How is this guide?