mistralM

Docs

sideBar

Agent configuration

The Mistral client and the audio.sessions.init() options — agent configuration vs session runtime.

This page lists every option you can pass to client.audio.sessions.init(). Options come in two scopes. Agent options define the agent itself: its models, voice, instructions, tools, and turn-taking. You can save them as a saved agent. Session options only apply to the session you open, such as which saved agent to start from and which audio interface to use.

pen

The tables use the Python names. In TypeScript, the same options are in camelCase: api_key becomes apiKey, server_url becomes serverUrl, and turn.allow_interruptions becomes turn.allowInterruptions.

The client

client.audio.sessions.init() is a method on the general-purpose Mistral client. Construct the client once, then start any number of sessions from it.

Mistral(
    api_key: str,
    server_url: str = "https://api.mistral.ai",
    timeout_ms: int = 60000,
)

Parameter

Type

Default

Description

api_keystrRequiredYour Mistral API key.
server_urlstr"https://api.mistral.ai"API base URL.
timeout_msint60000Timeout for the requests that create and close sessions.

Inline or saved configuration

You can pass the agent options to init() every time, which suits quick experiments. Or you can save them once as an agent and start each session with agent_id. When you set agent_id, the saved configuration is the base, and any agent option you also pass to init() overrides it for that session only. The saved agent doesn't change. Session options always apply. For an example, see Create an agent and start a session.

flag

In the browser, you don't call init(): your server creates the session with client.audio.sessions.create(), which takes the same options. See the Browser guide.

init() options

Agent options

These options are part of the agent configuration, and you can save them on an agent.

Option

Type

Default

Description

llmmappingmistral-small-latestModel that generates the answers.
sttmappingSpeech-to-text model, with optional language (ISO 639-1 code such as "fr"), context_bias (terms to favor), target_streaming_delay_ms (a multiple of 80 from 80 to 1200, default 240), and turn_detection (see End-of-turn detection). language, context_bias, and turn_detection need a Voxtral 3 realtime model; other models return a 422 error.
ttsmappingText-to-speech model and voice (voice_id).
instructionsstrNoneSystem prompt for the agent.
toolslist of toolsNoneTools the agent can call. See Tools.
welcome_messagestrNoneMessage the agent speaks when the session connects.
turnmappingallow_interruptions=TrueTurn-taking settings, including whether the user can interrupt the agent.

Session options

These options only apply to the session you open.

Option

Type

Default

Description

agent_idstrNoneStart the session from a saved agent.
agent_versionintLatestPin a specific version of agent_id.
audio_interfaceAudioInterfaceNoneAudio input and output. Leave it out to handle audio yourself, see Custom audio.
http_headersmapping of str to strNoneExtra headers for the request that creates the session.

End-of-turn detection

Set stt.turn_detection to let a Voxtral 3 realtime model decide when the user has finished speaking. Without it, the agent uses the model's default turn detection. Pass {} to use the server defaults, or set any of these fields:

Field

Range

Server default

What it does

start_threshold0 to 10.5Decides when the user starts or resumes speaking. Raise it if turns start too easily, such as on background noise.
eager_end_threshold0 to 10.5Decides when the user may have stopped. Lower it if eager ends fire too often.
end_threshold0 to 10.33Decides when the user has stopped. Lower it to cut people off less, at the cost of a later reply.
min_silence_ms0 or more500Minimum pause before the turn can end. Increase it to end turns too early less often, at the cost of a later reply.
end_timeout_ms0 or more3000Maximum pause before the turn ends anyway. Decrease it to cap the longest wait.

For example, to let the agent answer after a shorter silence:

session = await client.audio.sessions.init(
    stt={
        "model": "voxtral-mini-transcribe-realtime-3",
        "turn_detection": {"min_silence_ms": 300},
    },
)

For what each threshold does and the faster Aggressive preset, see Turn detection.

Text-to-speech

tts accepts the following fields:

Field

Availability

Description

modelAllText-to-speech model to use. Options are Voxtral TTS 3 (recommended) voxtral-mini-tts-3 and Voxtral TTS 2 voxtral-mini-tts-2603.
voice_idAllVoice to use, depending on the model. See the following lists.
phoneme_hintsVoxtral TTS 3 onlyPronunciation of specific words, as a map from each word to its list of IPA phonemes.
expressivenessVoxtral TTS 3 onlyNot available yet: this option is disabled for now. Will set how expressive the voice is, from 1.0 to 5.0.

Pronunciation

Use phoneme_hints to fix how the agent says names, brands, or acronyms. Each word maps to a list of IPA phonemes. Words are case-sensitive. Only English phonemes are supported, and a phoneme outside that set is rejected when you create the session or save the agent.

session = await client.audio.sessions.init(
    tts={
        "model": "voxtral-mini-tts-3",
        "voice_id": "voice_447",
        "phoneme_hints": {"Mistral": ["m", "ɪ", "s", "t", "ɹ", "ɑ", "l"]},
    },
)

Voxtral TTS 3 voices

On top of Voxtral TTS 2 voices listed below, here are the additional actor voices supported by Voxtral TTS 3.

Voice

Language

Gender

voice_id

SheilaEnglish (US)Femalevoice_478
MargaretEnglish (US)Femalevoice_447
RobEnglish (US)Malevoice_485
JamesEnglish (US)Malevoice_3150
MaryEnglish (UK)Femalevoice_1787
SkyEnglish (UK)Femalevoice_1786
DavidEnglish (UK)Malevoice_1788
HarrietEnglish (UK)Femalevoice_590
FredEnglish (UK)Malevoice_591
HugoEnglish (UK)Malevoice_3149
HowardEnglish (UK)Malevoice_3147
MarieFrenchFemalevoice_592
ManonFrenchFemalevoice_3137
LeaFrenchFemalevoice_589
CamilleFrenchFemalevoice_3141
ElenaSpanishFemalevoice_483
HeidiGermanFemalevoice_481
LorenzoItalianMalevoice_482
GabrielaPortugueseFemalevoice_480
MaryamArabicFemalevoice_479
JordiCatalanMalevoice_3143
AnanyaHindiFemalevoice_3139
HimanshuHindiMalevoice_3153
OliviaHungarianFemalevoice_3146
HarutoJapaneseMalevoice_3133
SungKoreanMalevoice_3136
JinKoreanMalevoice_3135
LotteDutchFemalevoice_3145
LarsNorwegianMalevoice_3134
LeonPolishMalevoice_3154
IrinaRomanianFemalevoice_3155
TatianaRussianFemalevoice_3132
OranTurkishMalevoice_3138
TarasUkrainianMalevoice_3140
HuongVietnameseFemalevoice_3144
MeiChineseFemalevoice_3142

Voxtral TTS 2 voices

On top of these actor voices, Voxtral TTS 2 supports instant voice cloning to create a voice from an audio sample.

Voice

Language

Gender

voice_id

PaulEnglish (US)Maleen_paul_{neutral,sad,happy,frustrated,excited,confident,cheerful,angry}
OliverEnglish (UK)Malegb_oliver_{neutral,sad,excited,curious,confident,cheerful,angry}
JaneEnglish (UK)Femalegb_jane_{neutral,sarcasm,confused,shameful,sad,jealousy,frustrated,curious,confident}
MarieFrenchFemalefr_marie_{neutral,sad,happy,excited,curious,angry}

Turn-taking

turn controls how the agent shares the conversation with the user:

Field

Description

allow_interruptionsWhether the user can interrupt the agent while it speaks. Defaults to True.
inactivityReminders the agent speaks when the user stays silent.

inactivity accepts:

Field

Type

Description

timeout_msintMilliseconds of silence before the first reminder. Default: 10000.
max_remindersintMaximum number of reminders before the session ends. Default: 2.
messageslist of strMessages the agent speaks. Default: ["Are you still there?"].
session = await client.audio.sessions.init(
    turn={
        "allow_interruptions": True,
        "inactivity": {
            "timeout_ms": 10000,
            "max_reminders": 2,
            "messages": ["Are you still there?"],
        },
    },
)

You can change instructions, tools, and turn on a running session. See Update a live session.

Going further

Create and manage agents
illustrationRobot

Create and manage agents

Save and version agent configurations, then start sessions from them.

Manage agent sessions
illustrationClock

Manage agent sessions

Session lifecycle, the event model, and error handling for production voice agents.

Tools
illustrationHammer

Tools

Give the agent web search, document libraries, connectors, and your own client-side functions — with fillers.