Loading...
Loading...
MiniMax TTS API - Text-to-Speech, Voice Cloning, Voice Design
npx skill4agent add notedit/happy-skills tts-skillexport MINIMAX_API_KEY="your-api-key"import sys
import os
# Get skill directory path
skill_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(skill_dir, "assets"))
from minimax_tts import text_to_audio, list_voices, voice_clone, voice_design, play_audio| Feature | Function | Description |
|---|---|---|
| Text-to-Speech | | Convert text to audio files |
| List Voices | | Get the list of available voices |
| Voice Cloning | | Clone voices based on audio files |
| Voice Design | | Generate voices based on text descriptions |
| Play Audio | | Play audio files |
text_to_audio(
text="Hello, welcome to the MiniMax TTS service!",
voice_id="female-shaonv",
output_path="./hello.mp3"
)voices = list_voices(voice_type="system")
for voice in voices:
print(f"{voice['voice_id']}: {voice['name']}")voice_clone(
voice_id="my-custom-voice",
audio_file="./sample.mp3",
voice_name="My Voice"
)voice_design(
prompt="A gentle young female voice with a slight southern accent",
preview_text="Hello, this is my voice"
)| Model | Description |
|---|---|
| speech-02-hd | HD version, best sound quality |
| speech-02-turbo | Fast version, low latency |
| speech-01-hd | Legacy HD version |
| speech-01-turbo | Legacy fast version |
| speech-2.6-hd | Version 2.6 HD |
| speech-2.6-turbo | Version 2.6 fast |
female-shaonvfemale-yujiefemale-chengshumale-qingnianmale-chengshulist_voices()