feat: 新增 MiniMax LLM 与 TTS 支持#75
Open
octo-patch wants to merge 1 commit into
Open
Conversation
Add MiniMax as a new provider for both chat (LLM) and speech (TTS): - MiniMaxLLM: subclasses OpenAILLM since MiniMax exposes an OpenAI-compatible Chat Completions API; defaults to MiniMax-M3 with base URL https://api.minimax.io/v1. - MiniMaxTTS: calls the MiniMax T2A v2 HTTP API and writes hex-decoded audio to a file, matching the AbstractTTS interface. - Add config entries for both modules in config/config.yaml. - Document MiniMax setup in README.md and README_en.md.
|
您发的邮件我已收到,谢谢您!!!
|
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
新增 MiniMax 作为 LLM 与 TTS 提供方,按现有模块化架构无缝接入,丰富百聆的对话与语音合成选择。
Add MiniMax as a new provider for both chat (LLM) and speech (TTS), following the existing modular architecture.
改动 / Changes
bailing/llm.py:新增MiniMaxLLM。MiniMax 提供 OpenAI 兼容的 Chat Completions 接口,因此直接继承现有的OpenAILLM,默认模型MiniMax-M3、默认 Base URLhttps://api.minimax.io/v1。bailing/tts.py:新增MiniMaxTTS,调用 MiniMax T2A v2 HTTP 接口,将返回的 hex 编码音频解码写入文件,符合AbstractTTS的to_tts(text)接口。config/config.yaml:在LLM与TTS下新增对应配置项(默认不改变selected_module)。README.md/README_en.md:补充 MiniMax 的配置说明。用法 / Usage
LLM:将
selected_module.LLM设为MiniMaxLLM,在LLM.MiniMaxLLM.api_key填入密钥即可(默认MiniMax-M3)。TTS:将
selected_module.TTS设为MiniMaxTTS,复用同一api_key(默认speech-2.8-hd)。测试 / Testing
MiniMaxLLM默认值/自定义覆盖/工厂创建均通过;MiniMaxTTS请求构造、endpoint、hex 解码(输出有效 mp3 头)、错误码处理均通过。/v1/chat/completions与/v1/t2a_v2实测,鉴权与模型名均被正确识别。