mistralM

Docs

sideBar

Audio Speech

API for speech generation.

POST /v1/audio/speech

Speech

Speech

Request Example

{
  "input": "ipsum eiusmod"
}

Request Body

AdditionalProperties
map<any>
conversation_history
array<SpeechUserTurn | SpeechAssistantTurn> | null

Prior turns, oldest first, alternating and ending on a user turn: input is the assistant reply to it. Conditions delivery, not speaker: set voice_id to choose the speaker. Requires voice_id to be a preset voice whose kind is pvc. Cannot be combined with ref_audio.

SpeechUserTurn
audio
RawAudio* required
RawAudio
data
string* required
role
string* required
SpeechAssistantTurn
audio
RawAudio* required
RawAudio
data
string* required
role
string* required
text
string* required

Text the assistant spoke on this turn.

expressiveness
number | null

Speaker flow-matching classifier-free guidance scale. Must be finite and at least 1.0.

input
string* required

Text to generate a speech from

metadata
map<any> | null
model
string | null
phoneme_hints
map<array<"a" | "aɪ" | "aʊ" | "b" | "d" | "dʒ" | "e" | "eɪ" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "oʊ" | "p" | "s" | "t" | "tʃ" | "u" | "v" | "w" | "z" | "æ" | "ð" | "ŋ" | "ɑ" | "ɔ" | "ɔɪ" | "ɖ" | "ə" | "ɚ" | "ɛ" | "ɜ" | "ɪ" | "ɱ" | "ɹ" | "ɾ" | "ʃ" | "ʈ" | "ʊ" | "ʋ" | "ʌ" | "ʒ" | "ʔ" | "θ" | "ʁ" | "r" | "ɑ̃" | "ʀ" | "x" | "y" | "ɔ̃" | "ɐ" | "œ" | "ɛ̃" | "ʝ" | "ɲ" | "ts" | "ɥ" | "ʏ" | "ø" | "β" | "ɦ" | "pf" | "ʎ" | "ɣ" | "ɳ" | "ɔʏ" | "œ̃" | "ɟʝ" | "ɬ" | "q">> | null

Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones.

prompt_cache_key
string | null
ref_audio
string | null

The audio reference for generating the speech.

response_format
"pcm" | "wav" | "mp3" | "flac" | "opus"
stream
boolean

Default Value: false

voice_id
string | null

The preset or custom voice to use for generating the speech.

Responses

Speech audio data.

audio_data
string* required

Base64 encoded audio data