Overview
Transform text from information to experience. With mars-instruct, you can craft speech that captures subtle emotional states, dramatic pacing, and conversational dynamics. Not just reading text, but performing it. mars-instruct gives you two ways to control expression:- Embedded emotion tags - Add cues like
[happy],[sad], or sound effects like[laughing],[sighing] user_instructionsparameter - Provide broader tone guidance like “Speak in an excited, upbeat tone”
Hear the Difference
Emotion Tags
Emotion Tone Tags
For emotional tone (happy, sad, angry), use tags withuser_instructions and match your text content to the emotion:
| Tag | Example Text | user_instructions |
|---|---|---|
[happy] | ”We won the match! This is the best day ever!" | "happy, excited, celebrating” |
[sad] | ”I… I don’t know if I can do this anymore…" | "sad, melancholic” |
Sound Effect Tags
Sound effect tags go within your sentence where the action naturally occurs:| Tag | Example | Notes |
|---|---|---|
[laughing] | ”That’s ridiculous! [laughing] I can’t believe that!” | Produces laughter sound |
[sighing] | ”I guess we have to start over. [sighing] Alright, let’s begin.” | Produces sigh sound |
ahem ahem | ”So what I was going to say is… ahem ahem… never mind.” | Produces throat-clearing sound |
user_instructions
Theuser_instructions parameter provides broader tone guidance for your entire speech.
| Instruction | Effect |
|---|---|
shouting, angry, threatening | Agitated, confrontational delivery |
whispering, secretive | Quiet, intimate delivery |
empathetic, helpful | Caring, supportive delivery |
happy, excited, promotional | Upbeat, promotional delivery |
patient, teaching | Educational, measured delivery |
Combining Both Methods
For precise control, combineuser_instructions with embedded emotion tags:
Pauses
Add SSML-style breaks anywhere in your text for dramatic pauses:Best Practices
- Combine methods - Use both
user_instructionsand embedded tags for best results - Match content to emotion - Text and punctuation should reflect the emotional tone
- Place sound effects naturally - Tags like
[laughing],[sighing]work best within sentences - Use emotions with instructions - Tags like
[happy],[sad]needuser_instructionsto work well - Add pauses - Use
<break time='600ms'/>for dramatic effect
Next Steps
Text to Speech
Get started with basic TTS using the Python or TypeScript SDK.
Choosing a Model
Compare mars-instruct with mars-flash and mars-pro.
Voice Cloning
Create custom voices for your emotional speech.
TTS with Accents
Generate speech in 140+ language accents.