- Studio
- Voice
- Text to Speech
Emotion and pace tags
Emotion and pace tags
Emotion and pace tags change how a voice says part of the text: write them inline in input, in square brackets, such as [emotion=happy] or [pace=slow]. To shape the delivery of the whole input instead, use style instructions.
For how tags compare with the other ways to direct a voice, and how emotion works in Voxtral 2 and Voxtral 3, see Voices.
Tag syntax
Emotion and pace tags share the same syntax and rules:
Rule | Details |
|---|---|
| Format | [emotion=<value>] or [pace=<value>], with a value from the tables on this page |
| Where | Inside input, before the text it applies to: at the start or in the middle of a sentence |
| Spoken | No: the tag isn't read aloud |
| Combine | Write an emotion tag and a pace tag one after the other, such as [emotion=calm][pace=slow] |
| Limit | You cannot use more than one tag of the same type on the same section of text |
| Scope | A tag applies from its position until the next tag or the end of the input. |
Emotion from the text
Voxtral TTS 3 infers the emotion from the text itself, so a tag isn't always needed. Neither of the following inputs has a tag:
Input | Output |
|---|---|
| Wow I can't believe you're pregnant! This is so exciting, congratulations Corina, I'm so happy for you! | 0:00 / 0:00 |
| What do you mean my passport won't be finished this week -- I've told you several times how I need to go to Paris for work. This is ridiculous. I can't even begin to describe how infuriating this has been. | 0:00 / 0:00 |
Use a tag when the text alone doesn't carry the emotion you want, or to change it in the middle of the input.
Tag an emotion
Put the emotion tag in input, before the text to say with that emotion:
curl -s https://api.mistral.ai/v1/audio/speech \
-H "Authorization: Bearer $MISTRAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "voxtral-mini-tts-3-0",
"input": "[emotion=happy]We passed the audit!",
"voice_id": "voice_478",
"response_format": "wav"
}' | jq -r '.audio_data' | base64 --decode > happy.wav
Supported emotions
The emotion tag takes one of these 34 values:
Emotion |
|---|
| amused |
| angry |
| anxious |
| apologetic |
| appreciative |
| assertive |
| bored |
| calm |
| confident |
| confused |
| critical |
| curious |
| determined |
| disappointed |
| disgusted |
| excited |
| frustrated |
| grateful |
| happy |
| hopeful |
| playful |
| proud |
| reflective |
| resigned |
| sad |
| sarcastic |
| skeptical |
| somber |
| surprised |
| tense |
| tired |
| urgent |
| warm |
| wistful |
Pace tags
Pace tags set the speaking rate. Use them to slow down a disclaimer, or to speed through a list:
Pace | Effect |
|---|---|
| very-slow | The voice speaks much slower than its normal rate. |
| slow | The voice speaks slower than its normal rate. |
| moderate | The voice speaks at a moderate rate. |
| fast | The voice speaks faster than its normal rate. |
| very-fast | The voice speaks much faster than its normal rate. |
The following example generates the same sentence at each pace:
import base64
import os
from pathlib import Path
from mistralai.client import Mistral
client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])
for pace in ["very-slow", "slow", "moderate", "fast", "very-fast"]:
response = client.audio.speech.complete(
model="voxtral-mini-tts-3-0",
input=f"[pace={pace}]Please read the terms carefully before you sign.",
voice_id="voice_478",
response_format="wav",
)
output = Path(f"pace_{pace}.wav")
output.write_bytes(base64.b64decode(response.audio_data))
print(f"Saved {output.resolve()}")
Combine tags with a style instruction
Tags and a style instruction work at different levels. Style instructions are not available at launch. See Style instructions.
Unsupported values
The API doesn't reject a tag with a value outside the tables on this page. A request such as [emotion=ecstatic] returns a normal response, and the tag isn't spoken.
Disfluencies
Disfluencies add natural sounds such as pauses, breaths, and laughter to the speech. Write them inline in input, in square brackets, just like emotion and pace tags:
Disfluency | Usage |
|---|---|
| um | [um] |
| uh | [uh] |
| laugh | [laugh] |
| breath | [breath] |
| sigh | [sigh] |
| gasp | [gasp] |
| sniff | [sniff] |
| cough | [cough] |
| throat clearing | [throat clearing] |
| yawn | [yawn] |
| chuckle | [chuckle] |
| laugh hard | [laugh hard] |
| gasping | [gasping] |
| rire | [rire] |
This is a non-exhaustive list. Disfluencies use the same syntax as emotion and pace tags: [disfluency] inline in input.
Language support
Emotion, pace, and disfluency tags work in English. They are untested but expected to work in French, German, Spanish, Italian, Portuguese, and Hindi.
Going further
Style instructions
Steer the delivery of the whole speech output with a short free-form instruction.
Voices (concept)
What a voice is in Mistral speech generation, the kinds of voices you can use, and the difference between choosing a voice and directing how it speaks.
Voices
Browse the preset voices and manage the voices saved in your workspace through the API.
Troubleshooting
The errors that speech requests return, the usual causes of speech that sounds wrong, flat, cut short, or slow to start, and the setting that fixes each one.