360 Secure SkillHub
360 安全技能中心

Edge TTS — Text-to-Speech

核心功能:将输入文本或文本文件转为语音,可调整语速、音调、音量,提供100+种不同风格音色,覆盖50+语言含中英。典型场景:制作中文播报、英文有声内容、儿童语音素材等。输入支持直接文本或文件,可自定义参数;输出为MP3音频,无需API密钥,需Python环境和网络。

vincentlau2046-sudo
vincentlau2046-sudo
热度 16.56
最近更新 2026-05-23 19:51:32
分类:效率依赖:代码执行 / 读写文件 / 第三方 API应用场景:文件转换

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add tts-cosyvoice
Metadata
name
tts-cosyvoice
version
1.0.0
description
Text-to-Speech via Edge TTS (Microsoft Azure voices). Free, no API key needed, supports 100+ voices in 50+ languages including Chinese and English.
metadata
{"openclaw":{"emoji":"🔊","requires":{"bins":["python3"]}}}
tags
["tts","text-to-speech","edge-tts","voice","audio"]

Edge TTS — Text-to-Speech

Use to convert text to speech using Microsoft Edge's free TTS service. No API key required.

Voices

Chinese (Recommended)

Voice Gender Style
zh-CN-XiaoxiaoNeural Female Warm, natural (default)
zh-CN-YunxiNeural Male Young, casual
zh-CN-YunjianNeural Male Professional, news
zh-CN-XiaoyiNeural Female Cute, young
zh-CN-YunyangNeural Male News broadcaster
zh-CN-XiaochenNeural Female Child
zh-TW-HsiaoChenNeural Female Traditional Chinese

English

Voice Gender Style
en-US-JennyNeural Female Friendly (default)
en-US-GuyNeural Male Professional
en-GB-SoniaNeural Female British

Script

{baseDir}/scripts/tts.py --text "Hello world" --output /tmp/output.mp3

Options

Option Default Description
--text (required) Text to speak
--voice zh-CN-XiaoxiaoNeural Voice ID
--output /tmp/tts_output.mp3 Output file path
--rate 0% Speed adjustment (-50% to +100%)
--pitch 0Hz Pitch adjustment (-50Hz to +50Hz)
--volume 0% Volume adjustment (-100% to +100%)
--file Read text from file instead of --text

Examples

# Basic Chinese TTS
{baseDir}/scripts/tts.py --text "你好,我是Nova" --output /tmp/hello.mp3

# Male voice, faster speech
{baseDir}/scripts/tts.py --text "Hello world" --voice en-US-GuyNeural --rate +20% --output /tmp/fast.mp3

# Read from file
{baseDir}/scripts/tts.py --file script.txt --output /tmp/script.mp3

Available Voices

List all voices:

{baseDir}/scripts/tts.py --list-voices zh
{baseDir}/scripts/tts.py --list-voices en
{baseDir}/scripts/tts.py --list-voices ja

Dependencies

  • edge-tts (pip install)
  • No API key needed — uses Microsoft Edge's free TTS service
  • Requires internet connection