Transcribe speech, generate expressive voices, and build real-time voice agents with Mistral's Voxtral audio models.
Mistral audio covers three jobs: turning speech into text, turning text into speech, and running both in live conversations. Voxtral 3 models transcribe recorded files and live streams, with speaker labels, timestamps, and custom vocabulary. They generate speech with preset or cloned voices, which you direct with emotion and pace tags. You can also send audio to a chat model to summarize or question a recording, and build voice agents that answer callers in real time.
This section is for developers who integrate audio through the API and SDKs, and for product teams who evaluate what Voxtral can do.
Not a developer? Dictate prompts and talk with Work in Voice mode, or analyze a recording by uploading it to a chat, with no code to write.
Stream audio as it's recorded and print the transcript while the speaker talks. The examples stream a WAV file at real-time pace to stand in for a live source. Realtime transcription runs over a WebSocket, so there's no curl example. Download the sample recording first, or fetch it from the command line:
curl -O https://docs.mistral.ai/audio/chat.wav
import asyncioimport osimport wavefrom mistralai.client import Mistralfrom mistralai.client.models import ( AudioFormat, RealtimeTranscriptionError, TranscriptionStreamDone, TranscriptionStreamTextDelta,)AUDIO_FILE = "chat.wav" # 16-bit mono PCM WAVasync def read_chunks(path): with wave.open(path, "rb") as wav: while chunk := wav.readframes(wav.getframerate() // 10): yield chunk await asyncio.sleep(0.1) # send 100 ms of audio every 100 ms, like a live sourceasync def main(): with wave.open(AUDIO_FILE, "rb") as wav: sample_rate = wav.getframerate() client = Mistral(api_key=os.environ["MISTRAL_API_KEY"]) async for event in client.audio.realtime.transcribe_stream( read_chunks(AUDIO_FILE), model="voxtral-mini-transcribe-realtime-3", audio_format=AudioFormat(encoding="pcm_s16le", sample_rate=sample_rate), ): if isinstance(event, TranscriptionStreamTextDelta): print(event.text, end="", flush=True) elif isinstance(event, TranscriptionStreamDone): print(f"\n\nFinal transcript: {event.text}") elif isinstance(event, RealtimeTranscriptionError): print(f"\nError: {event.error.message}")asyncio.run(main())
import { readFileSync } from 'node:fs'import { setTimeout as sleep } from 'node:timers/promises'import { AudioEncoding, RealtimeTranscription } from '@mistralai/mistralai/extra/realtime'const wav = readFileSync('chat.wav') // 16-bit mono PCM WAVconst sampleRate = wav.readUInt32LE(24)const pcm = wav.subarray(wav.indexOf('data') + 8)async function* readChunks() { const chunkSize = (sampleRate / 10) * 2 // 100 ms of 16-bit audio for (let i = 0; i < pcm.length; i += chunkSize) { yield pcm.subarray(i, i + chunkSize) await sleep(100) // send 100 ms of audio every 100 ms, like a live source }}const client = new RealtimeTranscription({ apiKey: process.env.MISTRAL_API_KEY })for await (const event of client.transcribeStream(readChunks(), 'voxtral-mini-transcribe-realtime-3', { audioFormat: { encoding: AudioEncoding.PcmS16le, sampleRate },})) { if (event.type === 'transcription.text.delta') { process.stdout.write(event.text) } else if (event.type === 'transcription.done') { console.log(`\n\nFinal transcript: ${event.text}`) } else if (event.type === 'error') { console.error(`\nError: ${JSON.stringify(event.error.message)}`) }}
import { MistralVoiceAgent } from '@mistralai/voice-agents'import { DefaultAudioInterface } from '@mistralai/voice-agents/audio/node'import type { TranscriptEvent } from '@mistralai/voice-agents/types'const client = new MistralVoiceAgent({ apiKey: process.env.MISTRAL_API_KEY! })const session = await client.connect({ llm: { model: 'mistral-small-latest' }, tts: { voiceId: 'fr_marie_neutral' }, instructions: 'You are a helpful voice assistant.', audioInterface: new DefaultAudioInterface(),})session.on('transcript', (event: TranscriptEvent) => { console.log(`${event.role}: ${event.content}`)})console.log('Voice agent connected. Press Ctrl+C to stop.')try { await session.wait()} finally { await session.close()}
This example answers with Mistral Small and speaks with the fr_marie_neutral voice. A LiveKit warning about a closed data channel can appear when the session opens or closes: it's harmless. To save the agent, add tools, and handle interruptions, follow Quickstart: build a voice agent.
Send a recording to a chat model with a question, and get a text answer. Download the sample recording first, or fetch it from the command line:
How Voxtral decides when someone has finished speaking, why it matters for live transcription and voice agents, and the trade-off between cutting people off and answering late.
Why names, drugs, and product terms come out wrong in transcription and in generated speech, and the hint that fixes each direction: context biasing for spelling, custom pronunciation for sound.
What diarization tells you about who spoke when, how reference clips turn anonymous speaker labels into known speakers, and what overlapping speech means for your interface.
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.
What you can build
Pick the scenario closest to your product. Each guide combines several capabilities into one result and links to the article behind every step.