Skip to content

feat(mistral): add voxtral TTS support#5245

Merged
theomonnom merged 6 commits intolivekit:mainfrom
jeanprbt:jean/feat/add-mistral-tts-support
Mar 28, 2026
Merged

feat(mistral): add voxtral TTS support#5245
theomonnom merged 6 commits intolivekit:mainfrom
jeanprbt:jean/feat/add-mistral-tts-support

Conversation

@jeanprbt
Copy link
Copy Markdown
Contributor

@jeanprbt jeanprbt commented Mar 27, 2026

Summary

  • Add TTS support to the livekit-plugins-mistralai plugin using Mistral's new voxtral-mini-tts-2603 model

Details

TTS implementation (tts.py)

  • ChunkedStream-based synthesis via client.audio.speech.complete_async() with streamed output
  • Supports configurable model, voice (28 voice presets across 4 speakers), and response format (mp3, wav, pcm, opus, flac)
  • Base64-decodes audio_data from the API response
  • Maps SDK errors to LiveKit's APITimeoutError, APIStatusError, and APIConnectionError
  • pcm audio format is default as it's fastest, requires additional float32 -> float16 conversion

Models & voices (models.py)

  • Added TTSModels literal: voxtral-mini-tts-2603, voxtral-mini-tts-latest
  • Added TTSVoices literal with 28 voice presets (Jane, Marie, Oliver, Paul)

This would solve issue #5247.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 27, 2026

CLA assistant check
All committers have signed the CLA.

devin-ai-integration[bot]

This comment was marked as resolved.

@jeanprbt
Copy link
Copy Markdown
Contributor Author

jeanprbt commented Mar 27, 2026

It's worth mentioning that both livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realtime/realtime_model.py & livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realtime/turn_tracker.py were only changed by make fix which called ruff format --fix. This was necessary to have all checks passing, even though this PR has nothing to do with these files.

@fabitokki
Copy link
Copy Markdown
Contributor

fabitokki commented Mar 27, 2026

Hello @jeanprbt

I just realized I did the same PR as you did 2 hours ago, sorry for that. Just wondering where you found the labels for the TTS ? I just found this one on the doc: "voxtral-tts-2603"

https://docs.mistral.ai/models/voxtral-tts-26-03

@jeanprbt
Copy link
Copy Markdown
Contributor Author

Hi @fabitokki,

I just realized I did the same PR as you did 2 hours ago, sorry for that. Just wondering where you found the labels for the TTS ? I just found this one on the doc: "voxtral-tts-2603"

I found the labels here. You can rely on this PR for official Mistral support of Voxtral TTS, no worries!

@lasryaric
Copy link
Copy Markdown

Would really love to have that. This might be some real competition for 11labs. When can we expect to have that available on the pip repository?

devin-ai-integration[bot]

This comment was marked as resolved.

@jeanprbt jeanprbt force-pushed the jean/feat/add-mistral-tts-support branch from 34e819b to 143fec3 Compare March 27, 2026 18:26
@jeanprbt
Copy link
Copy Markdown
Contributor Author

Would really love to have that. This might be some real competition for 11labs. When can we expect to have that available on the pip repository?

As soon as this PR is merged I guess! Looking forward too ;)

@fabitokki
Copy link
Copy Markdown
Contributor

I made a feature request @jeanprbt so you can link this PR to the request: #5247. You can upvote it as well so there is more chance for it to be noticed (we are quite a lot of people to want this actually).

They are usually quite fast to review PRs.

@jeanprbt
Copy link
Copy Markdown
Contributor Author

jeanprbt commented Mar 28, 2026

@fabitokki Done, I just edited the description. Thank you!

@fabitokki
Copy link
Copy Markdown
Contributor

@jeanprbt Cool, I closed my PR to avoid duplication. Have a good day!

Copy link
Copy Markdown
Member

@theomonnom theomonnom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! Thanks!

@theomonnom theomonnom merged commit 17495e8 into livekit:main Mar 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants