Documentation Index
Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
MistralTTSService provides text-to-speech synthesis using Mistral’s Voxtral TTS API. It uses HTTP streaming with Server-Sent Events to generate PCM-encoded audio at 24kHz.
Key features include:
- Streaming TTS with real-time audio generation
- Automatic resampling to pipeline sample rate
- Built-in metrics support
- Multiple voice options
Mistral TTS API Reference
Pipecat’s API methods for Mistral TTS
Example Implementation
Complete example with Mistral STT and TTS
Mistral Documentation
Official Mistral API documentation
Installation
To use Mistral TTS service, install the required dependencies:Prerequisites
Before usingMistralTTSService, you need:
- Mistral Account: Sign up at Mistral AI
- API Key: Generate an API key from your account dashboard
- Model Access: Ensure you have access to the Voxtral TTS API
Required Environment Variables
MISTRAL_API_KEY: Your Mistral API key for authentication
Configuration
Mistral API key for authentication.
Output audio sample rate in Hz. Audio is resampled from Mistral’s native 24kHz
when a different rate is requested. When
None, uses the pipeline’s
configured sample rate.Runtime-configurable settings for the TTS service. See Settings
below.
Settings
Runtime-configurable settings passed via thesettings constructor argument using MistralTTSService.Settings(...). These can be updated mid-conversation with TTSUpdateSettingsFrame. See Service Settings for details.
| Parameter | Type | Default | Description |
|---|---|---|---|
model | str | "voxtral-mini-tts-2603" | Mistral TTS model to use. (Inherited.) |
voice | str | None | Voice identifier. (Inherited.) |
language | Language | str | None | Language for synthesis. (Inherited.) |
Usage
Basic Setup
With Custom Settings
With Custom Sample Rate
Notes
- Audio format conversion: The Mistral API returns base64-encoded float32 PCM chunks via Server-Sent Events. The service automatically converts these to int16 PCM for the Pipecat pipeline.
- Native sample rate: Mistral’s TTS API outputs audio at 24kHz. When a different sample rate is specified, the service automatically resamples the audio.
- Streaming: The service uses HTTP streaming with Server-Sent Events for real-time audio generation, allowing for low-latency synthesis.