feat(voice): add Voxtral TTS provider (local + cloud)#34
Open
RollandMELET wants to merge 1 commit intoearlyaidopters:mainfrom
Open
feat(voice): add Voxtral TTS provider (local + cloud)#34RollandMELET wants to merge 1 commit intoearlyaidopters:mainfrom
RollandMELET wants to merge 1 commit intoearlyaidopters:mainfrom
Conversation
Add Voxtral (Mistral AI) as a TTS provider with two modes: - Local: mlx-audio server on Apple Silicon (zero cost, ~2.5GB VRAM) - Cloud: Mistral API ($16/M chars, OpenAI-compatible) Also adds: - toOggOpus() helper for reliable audio format conversion (Telegram requires OGG Opus; detects magic bytes to skip if already OGG) - Updated TTS cascade: Voxtral local -> Voxtral API -> ElevenLabs -> Gradium -> macOS say - .env.example documentation for all Voxtral config vars Local setup (Apple Silicon Mac): pip install mlx-audio mlx_audio.server --port 8881 # .env: VOXTRAL_LOCAL_URL=http://localhost:8881 Cloud setup: # .env: MISTRAL_API_KEY=your-key Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
toOggOpus()helper that converts any audio format to OGG Opus via ffmpeg, with magic-bytes detection to skip if already OGG. This also fixes ElevenLabs (returns MP3) and Gradium (returns raw Opus) which weren't being converted before..env.exampleMotivation
Running TTS locally eliminates API costs and latency. Voxtral 4B is Mistral's open-weight TTS model with native French support - ideal for ClaudeClaw users who self-host on Apple Silicon Macs. The cloud fallback uses the same Mistral API for users without local hardware.
Configuration
Test plan
VOXTRAL_LOCAL_URL, send a voice note, verify OGG Opus responseMISTRAL_API_KEYonly, verify cloud API fallback workstoOggOpus(): verify MP3 (ElevenLabs) and raw Opus (Gradium) are properly convertedBreaking changes
None. Fully backwards-compatible - existing setups without Voxtral vars work exactly as before.