feat(voice): add Xiaomi MiMo STT and TTS providers - #186
Merged
Conversation
Add Xiaomi MiMo as a new voice provider supporting both speech-to-text (ASR, mimo-v2.5-asr) and text-to-speech (mimo-v2.5-tts). Backend: - presets.py: add 'mimo' to builtin preset IDs; two presets (mimo-stt, mimo-tts) sharing kind='mimo'. TTS preset carries limited_free=True - adapters.py: transcribe_mimo() POSTs audio as base64 data URL to /chat/completions with model mimo-v2.5-asr; synthesize_mimo() POSTs text in assistant message with audio config to /chat/completions with model mimo-v2.5-tts, yields decoded WAV bytes - manager.py: add 'mimo' dispatch in transcribe() and synthesize() - test_stt/test_tts: include 'mimo' in credential checks Frontend: - VoiceSettingsPanel: endpoint Select (pay-as-you-go sk- vs Token Plan tp-), API key input, voice Select for TTS (9 preset voices) - limited_free badge shown on TTS preset card - voice.ts: add limited_free?: boolean to VoicePreset - i18n: 6 new keys (mimoHint, mimoEndpoint, mimoEndpointPayg, mimoEndpointTokenplan, mimoVoice, limitedFree) in en.json and zh.json Mimo API uses OpenAI Chat Completions format for both STT and TTS, requiring custom adapters instead of reusing existing OpenAI voice adapters that target /audio/transcriptions and /audio/speech.
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.
Add Xiaomi MiMo as a new voice provider supporting both speech-to-text (ASR, mimo-v2.5-asr) and text-to-speech (mimo-v2.5-tts).
Backend:
Frontend:
Mimo API uses OpenAI Chat Completions format for both STT and TTS, requiring custom adapters instead of reusing existing OpenAI voice adapters that target /audio/transcriptions and /audio/speech.
Summary
Target branch
develop(feature / fix — default)main(release/*orhotfix/*only)Type of change
Test plan
make allpasses locallyChecklist
CHANGELOG.md(if user-facing)