🦀 ClawHub
MiniMax TTS Generator
by @lanhaixuan
Text-to-speech (TTS) generation using MiniMax API. Converts text into natural-sounding speech with support for multiple voices, adjustable speed and pitch, a...
💡 Examples
From terminal
# Basic TTS - text to speech
MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_tts.py "你好,欢迎使用 MiniMax 语音合成"With voice selection
MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_tts.py "Hello world" --voice female-shaonvAdjust speed and pitch
MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_tts.py "快速播报新闻" --speed 1.5 --pitch 2Save to file
MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_tts.py "输出到文件" --output speech.mp3List available voices
MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_tts.py --list-voicesMulti-segment (audiobook/podcast with multiple voices)
MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_tts.py --segments segments.json --output combined.mp3
From code
from minimax_tts import generate_speechBasic TTS
result = generate_speech(text="你好世界", voice="female-shaonv", output_path="hello.mp3")With options
result = generate_speech(
text="这是一段测试语音",
model="speech-2.8-hd",
voice="female-tianmei",
speed=1.0,
pitch=0,
audio_format="mp3",
output_path="test.mp3"
)
⚙️ Configuration
1. Configure API Key
openclaw config set skills.entries.minimax-tts.apiKey "sk-your-key"
Or add to openclaw.json skills entries:
{
"skills": {
"entries": {
"minimax-tts": {
"apiKey": "sk-your-key"
}
}
}
}
2. Dependencies
pip install requests
TERMINAL
clawhub install minimax-tts-generator