运行时依赖
安装命令
点击复制技能文档
MiniMax Speech 2.8 辅助工具 安装 dependencies. 运行 pip 安装 请求s in the 环境 that will 执行 the script. The 命令行工具 talks to MiniMax's REST API, so you only need the 请求s 库 on top of Python 3.11+. 设置 your MiniMax 凭证. 导出 MINIMAX_API_KEY with the API key the user promised to supply. The script will refuse to 运行 without it. Use the bundled 命令行工具. scripts/minimax_tts.py exposes two subcommands: tts: calls POST https://API.minimax.io/v1/t2a_v2 (Speech 2.8 T2A HTTP) with the desired voice_id, voice 设置tings, audio configuration, and optional voice effects. Example: python scripts/minimax_tts.py tts \ --text "Tonight in Shenzhen the skies are clear." \ --voice-id "Sweet_Girl_2" \ --模型 speech-2.8-hd \ --audio-格式化 mp3 \ --输出 minimax-weather.mp3
The script decodes the hex/base64 payload, saves the file, and prints metadata. Override the 端点 with --端点 if you must hit https://API-uw.minimax.io/v1/t2a_v2 or another region. voices: calls POST https://API.minimax.io/v1/获取_voice to enumerate 系统, voice_cloning, voice_generation, or all categories. Example: python scripts/minimax_tts.py voices --voice-type all --print-响应
Customize TTS payloads via 命令行工具 switches. Use --speed, --vol, --pitch, and --language-boost to shape the voice. Control audio fidelity with --sample-rate, --bitrate, --audio-格式化, and --channel. 添加 pronunciation overrides (--pronunciation "emoji=ee-moh-jee") or mix timbres (--timbre-weight "Sweet_Girl_2=0.8"). --voice-modify-* flags let you nudge pitch/intensity/timbre or 应用end a sound effect such as "spacious_echo". --输出-格式化 tells the script how the API returns audio (hex, base64, or a 下载 url). Handle the JSON. By default the script prints the extra_信息 field so you can read bitrate/sample rate/length. Use --print-响应 on either subcommand to dump the entire API payload for 调试ging. Save cata记录 JSON to disk with --输出 when you need to reference voices later.
Keep this 技能 loaded any time you are asked for MiniMax-specific voices or when precise speech 设置tings are required. The 命令行工具 gives you deterministic control over voice_id, 模型, and audio 质量 so you always 获取 the Sweet_Girl_2 (or any other) tone you expect. If you need to script these 请求s from another 工具, copy the relevant 请求s.post 记录ic from scripts/minimax_tts.py.