LiveKit Agents Plugin for services from Mistral AI
Project description
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>"]),
]
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file livekit_plugins_mistralai-1.5.6.tar.gz.
File metadata
- Download URL: livekit_plugins_mistralai-1.5.6.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc7e2735ac633d20de74d90c4370f47c2de50665137e0689c926e5f957cff2be
|
|
| MD5 |
d38edc465e7d445cc0d10152c25fead1
|
|
| BLAKE2b-256 |
3b2352a1df69c5fb6d02bc598e0947ea8f1b610d6d6dca4142ddcaeab9ab076a
|
Provenance
The following attestation bundles were made for livekit_plugins_mistralai-1.5.6.tar.gz:
Publisher:
publish.yml on livekit/agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
livekit_plugins_mistralai-1.5.6.tar.gz -
Subject digest:
fc7e2735ac633d20de74d90c4370f47c2de50665137e0689c926e5f957cff2be - Sigstore transparency entry: 1359287761
- Sigstore integration time:
-
Permalink:
livekit/agents@25bd9c76b0e163195a6557f4a1528beaebeb2bd7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/livekit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@25bd9c76b0e163195a6557f4a1528beaebeb2bd7 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file livekit_plugins_mistralai-1.5.6-py3-none-any.whl.
File metadata
- Download URL: livekit_plugins_mistralai-1.5.6-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08efb8796ccc38ab7e94b8f5ede550b5712b07ddca268c7f43d45bddbf160c3a
|
|
| MD5 |
eebcd34b7d451d8fecb9ede9fb1ed06e
|
|
| BLAKE2b-256 |
9dab3bec6914bfe3ce87b2924c563bad0ea358753ce56f751a1c0a22d6740264
|
Provenance
The following attestation bundles were made for livekit_plugins_mistralai-1.5.6-py3-none-any.whl:
Publisher:
publish.yml on livekit/agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
livekit_plugins_mistralai-1.5.6-py3-none-any.whl -
Subject digest:
08efb8796ccc38ab7e94b8f5ede550b5712b07ddca268c7f43d45bddbf160c3a - Sigstore transparency entry: 1359287778
- Sigstore integration time:
-
Permalink:
livekit/agents@25bd9c76b0e163195a6557f4a1528beaebeb2bd7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/livekit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@25bd9c76b0e163195a6557f4a1528beaebeb2bd7 -
Trigger Event:
pull_request
-
Statement type: