LiveKit docs › Build Agents › Models › STT › Additional models › Mistral AI

---

# Mistral STT plugin guide

> How to use the Mistral STT plugin for LiveKit Agents.

Available in:
- [x] Node.js
- [x] Python

## Overview

This plugin allows you to use [Voxtral](https://mistral.ai/news/voxtral) as an STT provider for your voice agents.

### Installation

Install the LiveKit Mistral AI plugin from PyPI or npm:

**Python**:

```shell
uv add "livekit-agents[mistralai]~=1.8"

```

---

**Node.js**:

```shell
pnpm add @livekit/agents-plugin-mistralai

```

### Authentication

The Mistral AI integration requires a [Mistral AI API key](https://console.mistral.ai/api-keys/).

Set the `MISTRAL_API_KEY` in your `.env` file.

### Usage

Use Mistral AI STT in your `AgentSession` or as a standalone transcription service. For example, you can use this STT in the [Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai.md).

**Python**:

```python
from livekit.plugins import mistralai

session = AgentSession(
    stt=mistralai.STT(
        model="voxtral-mini-transcribe-realtime-3",
        language="en",
    ),
    # ... llm, tts, etc.
)

```

---

**Node.js**:

```typescript
import * as mistralai from '@livekit/agents-plugin-mistralai';

const session = new voice.AgentSession({
    stt: new mistralai.STT({
        model: "voxtral-mini-latest"
    }),
    // ... llm, tts, etc.
});

```

### Parameters

This section describes some of the available parameters. See the [plugin reference](https://docs.livekit.io/reference/python/livekit/plugins/mistralai.md#livekit.plugins.mistralai.STT) for a complete list of all available parameters.

- **`model`** _(STTModels | string)_ (optional) - Default: `voxtral-mini-transcribe-realtime-3`: Name of the Voxtral STT model to use. Models with `realtime` in their name stream interim transcripts over a websocket connection. The others are batch models that transcribe each utterance after it ends. The Voxtral 3 models are:

- `voxtral-mini-transcribe-realtime-3`: Realtime model with server-side turn detection.
- `voxtral-mini-transcribe-3`: Batch model.
- `voxtral-small-transcribe-3`: Larger batch model.

- **`language`** _(string)_ (optional): The language code to use for better transcription accuracy if already known (for example, `"fr"`). Used with batch models and the Voxtral 3 realtime model.

- **`context_bias`** _(list[str])_ (optional): Words or phrases to guide the model toward good spelling or names or domain-specific vocabulary. Up to 100 items can be provided. Used with batch models and the Voxtral 3 realtime model.

- **`target_streaming_delay_ms`** _(int)_ (optional): Target streaming delay in milliseconds for realtime mode. Only used with realtime models.

- **`turn_detection`** _(TurnDetection | None)_ (optional): Available in:
- [ ] Node.js
- [x] Python

Server-side turn detection settings for the Voxtral 3 realtime model. It's on by default with the server defaults, unless you set `diarize` or `vad`. Pass a `TurnDetection` dict to tune it, or `None` to turn it off. To learn more, see [Turn detection](#turn-detection).

- **`diarize`** _(bool)_ (optional) - Default: `False`: Available in:
- [ ] Node.js
- [x] Python

Labels each piece of text with its speaker. The batch models and the Voxtral 3 realtime model support diarization. To learn more, see [Speaker diarization](#speaker-diarization).

- **`vad`** _(vad.VAD)_ (optional): Voice activity detector the plugin runs on realtime models. Its end of speech flushes the audio to get the final transcript, and the plugin emits its start and end of speech as speech events. It takes precedence over Voxtral 3 server-side turn detection. You can't use both. Only used with realtime models.

## Turn detection

Available in:
- [ ] Node.js
- [x] Python

The Voxtral 3 realtime model (`voxtral-mini-transcribe-realtime-3`) detects when the user starts and stops speaking on the server, and the plugin finalizes the transcript of each turn. It's enabled by default. To use the end of each detected turn as the end of the user's turn in the session, set `turn_detection="stt"`. To learn more, see [STT endpointing](https://docs.livekit.io/agents/logic/turns.md#stt-endpointing).

```python
from livekit.plugins import mistralai

session = AgentSession(
    stt=mistralai.STT(
        model="voxtral-mini-transcribe-realtime-3",
        turn_detection={"min_silence_ms": 400, "end_timeout_ms": 1500},
    ),
    turn_handling={
        "turn_detection": "stt",
    },
    # ... llm, tts, etc.
)

```

All `TurnDetection` fields are optional, and the server applies its defaults to the ones you leave out:

- The `start_threshold`, `eager_end_threshold`, and `end_threshold` fields set the detection thresholds. They must satisfy `start_threshold >= eager_end_threshold > end_threshold`.
- The `min_silence_ms` field sets the minimum silence before the end of a turn.
- The `end_timeout_ms` field sets the maximum wait before the turn ends. It must be at least `min_silence_ms`.

To let the voice pipeline decide when a turn ends instead, pass `turn_detection=None`. Earlier realtime models, such as `voxtral-mini-transcribe-realtime-2602`, have no server-side endpointing either. In both cases, `AgentSession` flushes the audio based on its own VAD and turn detection to get the final transcript. If you use the STT on its own, outside of an `AgentSession`, call `stream.flush()` when the user stops speaking, or pass a VAD in the `vad` parameter to let the plugin flush for you.

## Speaker diarization

Available in:
- [ ] Node.js
- [x] Python

Set `diarize=True` to label each piece of text with its speaker. Transcripts and their segments include the speaker in the `speaker_id` field. The batch models and the Voxtral 3 realtime model support diarization. Earlier realtime models don't.

On the Voxtral 3 realtime model, diarization and server-side turn detection can't run together. Setting `diarize` turns off turn detection by default, and setting both raises a `ValueError`. Without server-side turn detection, the plugin emits no start and end of speech events. To use `turn_detection="stt"`, pass a VAD in the `vad` parameter to provide them:

```python
from livekit.plugins import mistralai, silero

session = AgentSession(
    stt=mistralai.STT(
        model="voxtral-mini-transcribe-realtime-3",
        diarize=True,
        vad=silero.VAD.load(),
    ),
    turn_handling={
        "turn_detection": "stt",
    },
    # ... llm, tts, etc.
)

```

The realtime model numbers speakers within a single transcript only. The numbering restarts after each flush. You can't compare speaker IDs across transcripts.

## Updating options

Available in:
- [ ] Node.js
- [x] Python

Use `stt.update_options()` to change `model`, `language`, `context_bias`, `target_streaming_delay_ms`, `diarize`, or `turn_detection`. Batch models apply the change to the next transcription. Realtime session settings can't change once audio starts. Changing one reconnects active streams and discards any transcript that isn't final yet. You can only switch to a model of the same kind (batch or realtime).

## Additional resources

The following resources provide more information about using Mistral AI with LiveKit Agents.

- **[Mistral AI platform docs](https://docs.mistral.ai/)**: Mistral AI platform documentation.

- **[Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai.md)**: Get started with LiveKit Agents and Mistral AI.

---

This document was rendered at 2026-11-14T14:30:38.864Z.
For the latest version of this document, see [https://docs.livekit.io/agents/models/stt/mistralai.md](https://docs.livekit.io/agents/models/stt/mistralai.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).