tts-skill

Original🇨🇳 Chinese
Translated
1 scriptsChecked / no sensitive code detected

MiniMax TTS API - Text-to-Speech, Voice Cloning, Voice Design

8installs
Added on

NPX Install

npx skill4agent add notedit/happy-skills tts-skill

Tags

Translated version includes tags in frontmatter

SKILL.md Content (Chinese)

View Translation Comparison →

MiniMax TTS Skill

This Skill provides a complete wrapper for the MiniMax TTS API, supporting text-to-speech, voice cloning, and voice design features.

Quick Start

1. Environment Configuration

Ensure the environment variable is set:
bash
export MINIMAX_API_KEY="your-api-key"
For detailed configuration instructions, see setup.md

2. Using the Python Module

python
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 Overview

FeatureFunctionDescription
Text-to-Speech
text_to_audio()
Convert text to audio files
List Voices
list_voices()
Get the list of available voices
Voice Cloning
voice_clone()
Clone voices based on audio files
Voice Design
voice_design()
Generate voices based on text descriptions
Play Audio
play_audio()
Play audio files

Detailed Documentation

  • Environment Configuration - API Key and dependency installation
  • Text-to-Speech - Detailed TTS feature explanation
  • Voice List - Available voices and filtering
  • Voice Cloning - Clone custom voices
  • Voice Design - Generate voices based on descriptions

Quick Examples

Text-to-Speech

python
text_to_audio(
    text="Hello, welcome to the MiniMax TTS service!",
    voice_id="female-shaonv",
    output_path="./hello.mp3"
)

List Available Voices

python
voices = list_voices(voice_type="system")
for voice in voices:
    print(f"{voice['voice_id']}: {voice['name']}")

Voice Cloning

python
voice_clone(
    voice_id="my-custom-voice",
    audio_file="./sample.mp3",
    voice_name="My Voice"
)

Voice Design

python
voice_design(
    prompt="A gentle young female voice with a slight southern accent",
    preview_text="Hello, this is my voice"
)

Supported Models

ModelDescription
speech-02-hdHD version, best sound quality
speech-02-turboFast version, low latency
speech-01-hdLegacy HD version
speech-01-turboLegacy fast version
speech-2.6-hdVersion 2.6 HD
speech-2.6-turboVersion 2.6 fast

Common Voice IDs

System Preset Voices

  • female-shaonv
    - Young girl voice
  • female-yujie
    - Sophisticated mature female voice
  • female-chengshu
    - Mature female voice
  • male-qingnian
    - Young male voice
  • male-chengshu
    - Mature male voice
For more voices, please use
list_voices()
to query.