Add MiniMax as LLM translation and TTS provider#197
Open
octo-patch wants to merge 1 commit intoR3gm:mainfrom
Open
Add MiniMax as LLM translation and TTS provider#197octo-patch wants to merge 1 commit intoR3gm:mainfrom
octo-patch wants to merge 1 commit intoR3gm:mainfrom
Conversation
Add MiniMax (MiniMax-M2.5, MiniMax-M2.7) as an alternative cloud provider for both text translation and text-to-speech, alongside existing OpenAI and Google Translate providers. Translation: - MiniMax-M2.5 and MiniMax-M2.7 models via OpenAI-compatible API - Sequential and batch translation modes (same as GPT workflow) - Think-tag and markdown code fence stripping for robust JSON parsing - Automatic fallback to Google Translate on failure TTS: - MiniMax speech-2.8-hd model with 12 voice options - Includes English, Chinese, and multilingual voices - Pattern-based TTS provider selection (MiniMax-TTS suffix) Integration: - MINIMAX_API_KEY environment variable for authentication - API key validation before processing - Gradio UI dropdown includes MiniMax TTS voices - README documentation for setup Tests: 37 unit tests + 9 integration tests (46 total, all passing)
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
https://api.minimax.io/v1gpt_sequential()/gpt_batch()by accepting an optionalclientparameter, minimizing code duplication<think>tags and markdown code fences from MiniMax model responses before JSON parsingMINIMAX_API_KEYenvironment variable checks in both media and docs conversion flowsChanges
soni_translate/translate_segments.py_create_minimax_client(), match-case routing for MiniMax models, think-tag & code-fence strippingsoni_translate/text_to_speech.pysegments_minimax_tts()function, regex pattern matching, 7-element return valuesoni_translate/language_configuration.pyMINIMAX_TTS_MODELSlist (12 voices)app_rvc.pyREADME.mdtests/Test plan
python -m pytest tests/ -v)MINIMAX_API_KEYand run integration tests:python -m pytest tests/test_minimax_integration.py -vHow to test locally