Fix Voxtral TTS tokenizer dependency contract#633
Conversation
There was a problem hiding this comment.
Please add this to test_models.py
There was a problem hiding this comment.
Moved into test_models.py in 042355c.
|
Moved the tests back to a standalone file — when the test class lives in |
| @@ -0,0 +1,35 @@ | |||
| import tomllib | |||
There was a problem hiding this comment.
@lyonsno Can we avoid adding a new dependency here?
There was a problem hiding this comment.
@lucasnewman I don’t think we can safely avoid it in this PR. Voxtral TTS already depends on SpeechRequest / encode_speech_request from mistral-common[audio], and the old no-extra fallback was the path producing bad
audio. This change is just making the .[tts] install contract match the actual runtime requirement for Voxtral, and mistral-common[audio] is already present in our stt, sts, and all extras. If we want a
smaller install surface, I’d rather handle that as a follow-up by splitting Voxtral into its own extra instead of keeping a broken fallback in tts.
|
@lyonsno Looks like the TTS tests are failing even though the mistral common package is being installed. Can you take a look? |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
I Took a look. The TTS failure was on an earlier PR head; I pushed follow-up fixes afterward, and the current head ( |
Summary
mistral-common[audio]was unavailable — replace with a clearRuntimeErrormistral-common[audio]to thettsextra so the speech tokenizer is available in clean installsMotivation
Voxtral TTS looked broken in clean
.[tts]environments not because the model was bad, but because the integration silently fell back to a manual prompt-construction path whenencode_speech_request(...)was unavailable. That fallback accepted the wrong prompt shape and produced garbage audio with no error. This makes the contract explicit.Test plan
python -m unittest mlx_audio.tts.tests.test_voxtral_tts -v— both tests passorigin/main— clean single commitCo-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com