Skip to main content

Mistral AI Plugin for LiveKit Agents

Support for Mistral AI STT, TTS, and LLM services.

Installation

pip install livekit-plugins-mistralai

For streaming STT (Voxtral Realtime), also install silero plugin.

pip install livekit-plugins-silero

Pre-requisites

You'll need an API key from Mistral AI. It can be set as an environment variable:

export MISTRAL_API_KEY=your_api_key_here

Usage

Speech-to-Text (STT)

Offline transcription

from livekit.plugins import mistralai

stt = mistralai.STT()

# With context biasing
stt = mistralai.STT(
    model="voxtral-mini-latest",
    context_bias=["LiveKit", "Voxtral", "Mistral"]
)

Realtime streaming transcription

Voxtral Realtime streams interim transcripts over a WebSocket connection. Since this model has no server-side endpointing, the plugin runs an internal Silero VAD to detect when the user stops speaking and flush the audio — producing final transcripts and driving the end-of-turn pipeline.

from livekit.plugins import mistralai
from livekit.plugins.silero import VAD

# Using Silero VAD with default settings (550ms silence threshold)
stt = mistralai.STT(model="voxtral-mini-transcribe-realtime-2602")

# Using custom VAD settings (e.g. shorter silence threshold for faster responses)
stt = mistralai.STT(
    model="voxtral-mini-transcribe-realtime-2602",
    vad=VAD.load(min_silence_duration=0.3),
)

Text-to-Speech (TTS)

from livekit.plugins import mistralai

# Using a built-in voice
tts = mistralai.TTS(voice="en_paul_neutral")

# Using zero-shot voice cloning
import base64
ref_audio_b64 = base64.b64encode(open("sample.mp3", "rb").read()).decode()
tts = mistralai.TTS(ref_audio=ref_audio_b64)

LLM

from livekit.plugins import mistralai

llm = mistralai.LLM()

# With all available options
llm = mistralai.LLM(
    model="mistral-large-latest",
    temperature=0.7,
    top_p=0.9,
    max_completion_tokens=150,
    presence_penalty=0.1,
    frequency_penalty=0.1,
    random_seed=42,
    tool_choice="auto",
)

# With provider tools
agent = Agent(
    llm=llm,
    tools=[
        mistralai.tools.WebSearch(),
        mistralai.tools.CodeInterpreter(),
        mistralai.tools.DocumentLibrary(library_ids=["<your-library-id>"]),
        mistralai.tools.Connector(connector_id="<your_connector_id>")
    ]
)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livekit_plugins_mistralai-1.7.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

livekit_plugins_mistralai-1.7.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_mistralai-1.7.0.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_mistralai-1.7.0.tar.gz
Algorithm Hash digest
SHA256 31f1631d01a7a24e744476dc3172393b4555279d4deb69f642d9d914a7ad62af
MD5 47c75145ba876ac2ee7ceb22cc8a7a29
BLAKE2b-256 684cfd9969df792295622c15c7c9509c6c9b07a3a8499d8f654a9cb4d8025ded

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_mistralai-1.7.0.tar.gz:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file livekit_plugins_mistralai-1.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_mistralai-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e78c78ca2b126f57db4ffab6922dbdd7f6fdf2528182980eefa4e99b65db4ea5
MD5 8f0ef07b51c010cb35ad176416fef1fe
BLAKE2b-256 a176780271159ae512e1f4a4c24a5538cb9b0bfdfff0dbdc0be2a2d5b5e704a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_mistralai-1.7.0-py3-none-any.whl:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.7.0 This release

2 files

1.6.10

2 files

1.6.9

2 files

1.6.8

2 files

1.6.7

2 files

1.6.6

2 files

1.6.5

2 files

1.6.4

2 files

1.6.3

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.18

2 files

1.5.17

2 files

1.5.16

2 files

1.5.15

2 files

1.5.14

2 files

1.5.13

2 files

1.5.12

2 files

1.5.11

2 files

1.5.10

2 files

1.5.9

2 files

1.5.8

2 files

1.5.7

2 files

1.5.6

2 files

1.5.5

2 files

1.5.4

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.6

2 files

1.4.5

2 files

1.4.4

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.3.12

2 files

1.3.11

2 files

1.3.10

2 files

1.3.9

2 files

1.3.8

2 files

1.3.7

2 files

1.3.6

2 files

1.3.5

2 files

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.2.18

2 files

1.2.17

2 files

1.2.16

2 files

1.2.15

2 files

1.2.14

2 files

1.2.13

2 files

1.2.12

2 files

1.2.11

2 files

1.2.9

2 files

1.2.8

2 files

1.2.7

2 files

1.2.6

2 files

1.2.5

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.7

2 files

1.1.5

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page