> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Mistral AI

> Use the Mistral AI text-to-speech plugin in a Zero Runtime pipeline. Setup and usage in Python.

Mistral AI is a **text-to-speech** plugin. It uses Mistral's Voxtral voices: expressive multilingual speech with zero-shot voice cloning from a short clip.

## Setup

Set your Mistral AI API key in the worker environment. Generate a key from the [Mistral AI site](https://console.mistral.ai/api-keys):

```bash theme={null}
export MISTRALAI_API_KEY=<key>
```

## Usage

Import the plugin and pass it to the pipeline's `tts` slot.

```python Python theme={null}
from zeroruntime.plugins import MistralAITTS

tts = MistralAITTS()

# Pipeline(tts=tts, ...)
```

> [!NOTE]
>
> `MistralAITTS` ships in the Python SDK only. The Node JS SDK does not include this plugin yet.

> [!NOTE]
>
> `MistralAITTS` requires a `zeroruntime` release newer than 0.1.9.

## Parameters

*Constructor parameters for `MistralAITTS`.*

| Parameter | Type | Default | Description |
| - | - | - | - |
| `api_key` | `str` | `None` | Mistral AI API key. Falls back to the `MISTRALAI_API_KEY` environment variable when unset. |
| `model` | `str` | `"voxtral-mini-tts-3-0"` | Voxtral model, e.g. "voxtral-mini-tts-3-0" or "voxtral-mini-tts-2603". Use "mistralai/Voxtral-4B-TTS-2603" with a self-hosted base\_url. |
| `voice` | `str` | `None` | Voice ID: a Voxtral 3 preset such as "voice\_478", a Voxtral 2 slug such as "gb\_jane\_neutral", or a voice saved in your Mistral workspace. |
| `ref_audio` | `str` | `None` | Base64 audio clip of a few seconds to clone a voice from, used when no voice is set. |
| `expressiveness` | `float` | `None` | Strength of expressive delivery, 1.0 to 5.0. Higher is more emotive but less like the chosen voice. Leave unset to let Mistral decide. |
| `base_url` | `str` | `None` | Address of a self-hosted vLLM-Omni server running Voxtral, e.g. "[http://host:8000/v1](http://host:8000/v1)". |
| `chunked_synthesis` | `bool` | `False` | Synthesize each sentence as soon as it is ready instead of the whole reply at once. Faster first audio for long replies, at some cost to natural flow. |

## Import paths

| SDK | Import | Constructor |
| - | - | - |
| Python | `from zeroruntime.plugins import MistralAITTS` | `MistralAITTS()` |

Synthesized audio is streamed back to the caller after the [LLM](https://docs.zeroruntime.ai/runtime-sdk/plugins/overview.md) produces a response.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.