Index of every page on this site: llms.txt
All skills
notedit avatar

/tts-skill

@9a2d593
by leeoxiangnotedit/happy-skills341 stars
40
Run it yourself

MiniMax TTS API - 文本转语音、声音克隆、声音设计

Use this Skill: https://skilld.dev/gh/notedit/happy-skills/tts-skill

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈19 tokens for metadata: the name and description. ≈631 when used: this file. ≈3.6k more on demand in 5 files.

How this Skill uses context

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈45 characters, or 0.6%.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

MiniMax TTS Skill

这个 Skill 提供 MiniMax TTS API 的完整封装,支持文本转语音、声音克隆和声音设计功能。

快速开始

1. 环境配置

确保已设置环境变量:

export MINIMAX_API_KEY="your-api-key"

详细配置说明见 setup.md

2. 使用 Python 模块

import sys
import os

# 获取 skill 目录路径
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

功能概览

功能 函数 说明
文本转语音 text_to_audio() 将文本转换为语音文件
列出声音 list_voices() 获取可用的声音列表
声音克隆 voice_clone() 基于音频文件克隆声音
声音设计 voice_design() 根据文字描述生成声音
播放音频 play_audio() 播放音频文件

详细文档

快速示例

文本转语音

text_to_audio(
    text="你好,欢迎使用 MiniMax TTS 服务!",
    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="我的声音"
)

声音设计

voice_design(
    prompt="一个温柔的年轻女性声音,带有轻微的南方口音",
    preview_text="你好,这是我的声音"
)

支持的模型

模型 说明
speech-02-hd 高清版本,音质最佳
speech-02-turbo 快速版本,延迟低
speech-01-hd 旧版高清
speech-01-turbo 旧版快速
speech-2.6-hd 2.6 版高清
speech-2.6-turbo 2.6 版快速

常用声音 ID

系统预设声音

  • female-shaonv - 少女音
  • female-yujie - 御姐音
  • female-chengshu - 成熟女声
  • male-qingnian - 青年男声
  • male-chengshu - 成熟男声

更多声音请使用 list_voices() 查询。

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides a standard Python wrapper for the MiniMax Text-to-Speech API. It safely manages API keys through environment variables and uses system audio players to play generated speech files. No malicious patterns or security vulnerabilities were detected.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer9mo

    7/7 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 9a2d593. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 9 months ago
metadata
{
  "tags": "minimax, tts, voice, audio, speech"
}

README badge

README badge for notedit/happy-skills/tts-skill