MiniMax TTS 到 OpenAI API 代理
这个项目提供了一个代理服务,将 MiniMax TTS API 转换为与 OpenAI 兼容的格式,使您能够将 MiniMax 的文本转语音功能与为 OpenAI API 设计的工具和库一起使用。
特性
- OpenAI 兼容的 TTS API 端点
- 支持多种语音和模型
- 流式和非流式音频响应
- API 密钥认证
- 从 MiniMax API 动态获取语音列表
- 可配置的默认设置
安装
-
克隆仓库:
git clone https://github.com/Moha-Master/MiniMax-TTS-OpenAI.git cd MiniMax-TTS-OpenAI
-
安装依赖:
pip install -r requirements.txt
-
通过复制
config.yaml.example到config.yaml并使用您的 MiniMax API 凭据和其他设置进行编辑来配置服务。 -
运行服务:
uvicorn minimax_tts_openai.app:app --host 0.0.0.0 --port 8000
作为 pip 包安装
您也可以将此项目作为 pip 包安装:
pip install -e .
安装后,您可以使用以下命令运行服务:
minimax-tts-openai --dir /path/to/config --host 0.0.0.0 --port 8000
参数说明:
--dir: 工作目录,从中读取 config.yaml(默认:~/.config/minimax-tts-openai/)--host: 绑定的主机地址(默认:127.0.0.1)--port: 绑定的端口(默认:8000)
配置
在希望的工作目录中创建一个基于 config.yaml.example 的 config.yaml 文件,包含您的 MiniMax API 凭据和其他设置。服务会从 ~/.config/minimax-tts-openai/ 或设置的 --dir 中读取 config.yaml。
如果指定的目录中没有 config.yaml 文件,程序会提示您需要从 config.yaml.example 复制并编辑配置文件。
配置选项:
minimax.group_id: 您的 MiniMax 组 IDminimax.api_key: 您的 MiniMax API 密钥api_keys: 用于认证的 API 密钥列表defaults: 默认参数值(语音、模型、速度等)audio: 音频设置(采样率、比特率、声道)voice_fetching: 音色获取配置(voice_type 参数)supported: 支持的格式和模型
语音列表在启动时从 MiniMax API 自动获取。
API 端点
POST /v1/audio/speech: 从文本生成语音(OpenAI 兼容)GET /v1/audio/voices: 列出可用的语音GET /v1/audio/models: 列出可用的模型
Metadata
Release files for minimax-tts-openai 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| minimax_tts_openai-0.0.4.tar.gz | 8.2 kB | Without provenance | Details for minimax_tts_openai-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| minimax_tts_openai-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for minimax_tts_openai-0.0.4-py3-none-any.whl |
Total release size: 17.3 kB
Release files / minimax_tts_openai-0.0.4.tar.gz
| Download URL | minimax_tts_openai-0.0.4.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66a1b0ffcabd1cd637799a75119d42a631c408eaa3a1474d7afcdbe8fc15830e
|
|
BLAKE2b-256 checksum How to use checksums |
d7f6dd9bb88f310d0865d5c788a4e1987c9b5914546c4b267020d8db3b1a9b35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / minimax_tts_openai-0.0.4-py3-none-any.whl
| Download URL | minimax_tts_openai-0.0.4-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d863b7c102b36144ec6c89fecae621e52e0a4b3038650459ac676938d9f66c80
|
|
BLAKE2b-256 checksum How to use checksums |
0126b19c308e628820a91991f5864482675d859309d89331fb48b25c39588469
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for minimax-tts-openai 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.