360 Secure SkillHub
360 安全技能中心

Text To Speech

该 Skill 通过 Python 脚本将输入文本生成语音音频文件,支持指定输出路径、语言代码、音色和语速,并可列出可用音色。主流程为命令行单次调用,适合制作旁白、播客或文章音频。

dinghaibin
dinghaibin
热度 32.07
最近更新 2026-05-11 17:47:34
分类:创作依赖:代码执行 / 读写文件应用场景:故事创作

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add dinghaibin-text-to-speech
Metadata
name
text-to-speech
description
Convert text to speech audio files. Use when user needs to create audio from text, generate voiceovers, create podcasts, or convert articles to audio.

Text to Speech

Convert text to speech audio files.

Quick Start

# Convert text to speech
python scripts/tts.py "Hello world" --output hello.mp3

Usage

python scripts/tts.py TEXT [OPTIONS]

Options:
  --output PATH      Output audio file
  --voice VOICE      Voice name (male, female, neutral)
  --speed RATE       Speaking speed (0.5-2.0)
  --lang LANG       Language code (en, zh, ja, etc.)
  --list-voices     List available voices

Examples

# Basic conversion
python scripts/tts.py "Hello world" --output hello.mp3

# Chinese text
python scripts/tts.py "你好世界" --lang zh-CN --output chinese.mp3

# Different speed
python scripts/tts.py "Hello" --speed 1.5 --output fast.mp3
python scripts/tts.py "Hello" --speed 0.8 --output slow.mp3

# List voices
python scripts/tts.py --list-voices

Features

  • Multiple language support
  • Adjustable speaking speed
  • Voice selection
  • Audio format output
  • SSML support