feat(asr): add MiMo (Xiaomi) ASR provider#103
Merged
Conversation
Add support for Xiaomi MiMo-V2.5-ASR, which uses an OpenAI-compatible chat completions endpoint with base64 audio input and SSE streaming. - New provider: koe-asr/src/mimo.rs with 19 unit tests - Config: MimoAsrConfig with url, api_key, model, language fields - UI: Setup wizard entry with API key field, test connection button - Default endpoint: https://api.xiaomimimo.com/v1/chat/completions
Audio and personal data go to Xiaomi's servers when using MiMo ASR. Make that explicit in the setup wizard: an orange notice appears under the API key row whenever the MiMo provider is selected, clarifying that Koe itself collects nothing and runs no servers. Co-Authored-By: Claude Fable 5 <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
Changes
New file:
koe-asr/src/mimo.rs— MiMo ASR provider implementation with 19 unit tests (WAV wrapping, request body construction, response parsing, SSE line parsing, provider lifecycle)Modified files:
koe-asr/src/lib.rs— registermimomodule and re-exportMimoAsrProviderkoe-core/src/config.rs— addMimoAsrConfigstruct withurl,api_key,model,languagefields, defaults, and YAML config entrykoe-core/src/lib.rs— add match arm for"mimo"provider selectionKoeApp/.../SPSetupWizardWindowController.m— add MiMo to setup wizard (popup item, API key field with secure/plain toggle, show/hide logic, config save/load, test connection method, pane height)How it works
send_audio()finish_input(), PCM is wrapped in WAV, base64-encoded, and sent asdata:audio/wav;base64,...in a chat completions requestchoices[0].delta.content(streaming) orchoices[0].message.content(non-streaming)api-keyheaderConfig example
Test plan
cargo fmt --checkcleancargo clippy— no new warnings