← Back to Skills Marketplace
nufeng1999

chinese-voice-skill

by nufeng1999 · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ✓ Security Clean
646
Downloads
0
Stars
5
Active Installs
5
Versions
Install in OpenClaw
/install chinese-voice-skill
Description
使用微软 Edge TTS 生成高质量中文语音,默认使用 XiaoxiaoNeural 语音。当用户需要语音回复时自动触发。
README (SKILL.md)

Edge TTS 中文语音合成技能

概述

使用微软 Edge TTS 生成高质量中文语音,默认使用 XiaoxiaoNeural 语音。当用户需要语音回复时自动触发。

能力

  • 语音合成: 将文本转换为高质量的中文语音
  • 默认语音: zh-CN-XiaoxiaoNeural(甜美自然的中文语音)
  • 备用方案: 当 edge-tts 不可用时,自动降级到系统自带的 System.Speech
  • 平台支持:
    • ✅ QQ 发送(\x3Cqqmedia> wav 格式)

使用方式

基本用法

当用户表达需要语音回复时(如"生成语音"、"用语音告诉我"、"用语音说"),系统会自动:

  1. 检测 edge-tts 是否可用
  2. 使用 Edge TTS + XiaoxiaoNeural 生成语音
  3. 发送 \x3Cqqmedia>输出文件.wav\x3C/qqmedia>

前置条件

  1. Python 3.7+ 已安装(用于运行 edge-tts)
  2. pip 可用
  3. QQ 通道 已配置(用于发送 wav 格式语音)

配置选项

语音选择

  • 默认: zh-CN-XiaoxiaoNeural
  • 其他可选微软语音:
    • zh-CN-YunxiNeural(沉稳)
    • zh-CN-XiaoyiNeural(温柔)
    • zh-CN-YunyangNeural(磁性)

语音参数

  • Rate: 语速(默认 0,可调整 -5 到 5)
  • Volume: 音量(默认 1.0,范围 0 到 1)

技术实现

命令行调用

使用 Python 的 edge_tts 模块:

python -m edge_tts --voice "zh-CN-XiaoxiaoNeural" --text "要转换的文本" --write-media "输出文件.wav"

安装 edge-tts

如果未安装,使用 pip 安装:

pip install --user edge-tts -i https://mirrors.aliyun.com/pypi/simple/

备用语音方案

如果 edge-tts 不可用,系统会自动使用系统自带的中文 TTS。

输出格式

  • 文件格式: WAV(微软 TTS 标准格式)
  • 采样率: 24000 Hz
  • 声道: 单声道
  • 位深度: 16-bit

注意事项

  1. 网络要求: edge-tts 需要访问微软服务器
  2. 文件大小: 生成的语音文件通常在 50-200 KB
  3. 自动清理: 临时文件可能由系统自动清理
  4. 备用方案: 当 edge-tts 不可用时自动降级,不影响基本功能

示例

用户: 生成语音,"你好!这是一段测试文本。"

AI: [调用 edge-tts 生成语音]
[发送 \x3Cqqmedia>C:\Users\ADMINI~1\AppData\Local\Temp\xxx.wav\x3C/qqmedia>]
[提示语音生成完成]

故障排除

edge-tts 未安装

使用 pip 安装 edge-tts:

pip install --user edge-tts -i https://mirrors.aliyun.com/pypi/simple/

edge-tts 路径问题

检查 edge-tts 是否在 PATH 中:

Get-Command edge-tts.exe -ErrorAction SilentlyContinue

语音未生成

  1. 检查网络连接
  2. 查看错误信息
  3. 确认 QQ 通道已配置
  4. 确认 ffmpeg 已安装(如需转换格式)
Usage Guidance
This skill is internally consistent: it runs edge-tts (a Python client) to synthesize Chinese speech, contacts Microsoft's TTS servers, and writes temporary WAV files which the agent sends over your configured QQ channel. Before installing, consider: (1) privacy — the text you synthesize will be sent to Microsoft servers; (2) runtime requirements — Python/pip, network access, and optionally ffmpeg for format conversion; (3) platform differences — some examples are Windows-specific (PowerShell, Windows temp paths) while allowed-tools references Bash; (4) pip will be used to install a third-party package (edge-tts) so verify you are comfortable with that dependency and its upstream behavior. The skill does not request credentials or access unrelated system files.
Capability Analysis
Type: OpenClaw Skill Name: chinese-voice-skill Version: 1.0.4 The skill is designed to provide Chinese text-to-speech functionality using the legitimate 'edge-tts' Python library. The instructions in SKILL.md guide the agent to install the necessary dependency via pip and execute standard commands to generate audio files. No indicators of data exfiltration, malicious persistence, or harmful prompt injection were found; the requested permissions and network access are consistent with the stated purpose of interacting with Microsoft's TTS services.
Capability Assessment
Purpose & Capability
Name/description (Chinese TTS via Microsoft Edge TTS) aligns with instructions that call the edge-tts Python module. Required binaries (python, pip) are reasonable for running/installing edge-tts. References to QQ as a delivery channel are consistent with sending generated WAV files.
Instruction Scope
SKILL.md instructs the agent to run python -m edge_tts to produce WAV files and to install edge-tts via pip if missing. It mentions checking PATH and a Windows PowerShell example, and optional use of ffmpeg. The instructions do not request reading unrelated files or environment variables, but they will cause outgoing network calls to Microsoft servers (expected for edge-tts) and will create temporary audio files (examples reference a Windows temp path).
Install Mechanism
No install spec in the skill itself (instruction-only). Installation guidance uses pip (a standard package manager) and an explicit PyPI mirror URL; this is moderate-risk but expected for a Python TTS wrapper. There are no downloads from arbitrary URLs or extract steps.
Credentials
The skill declares no required environment variables or credentials. It mentions QQ channel configuration and network access to Microsoft, which are reasonable and proportional to the described functionality. No unrelated secrets are requested.
Persistence & Privilege
always is false and the skill is user-invocable; there is no indication it modifies other skills or requests persistent elevated privileges. It is instruction-only and does not attempt to persist credentials or modify global settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install chinese-voice-skill
  3. After installation, invoke the skill by name or use /chinese-voice-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.4
- 更新 QQ 语音输出标签,由 `<qqvoice>` 更改为 `<qqmedia>`。 - 相关示例与说明同步为新标签格式,提升平台适配性。 - 无其他功能性变更。
v1.0.3
Version 1.0.3 of Chinese Voice Skill - No file changes detected; this is a metadata version update only. - All features and documentation remain the same as the previous release.
v1.0.2
- Documentation simplified and streamlined for clarity and ease of use - Audience focus narrowed: triggers only on clear user voice-reply intent - Technical details, workflow steps, and script explanations condensed - Prerequisite and troubleshooting guidance improved for quick setup - All functionality and configuration options retained; no file/code changes
v1.0.1
- Added auto_speak.ps1: a main script for automatic Chinese speech synthesis and reply, supporting fallback to local TTS when edge-tts is unavailable. - The skill now auto-installs edge-tts when not present, using pip and Aliyun mirror, and updates PATH as needed. - Introduced new workflow: detects the need for voice reply, triggers auto_speak.ps1, and outputs <qqvoice> for direct sending. - Enhanced documentation: now includes clear intent triggers, auto install notes, tool checks, and parameter options. - Target platform is prioritized for QQ replies with wav format output. - Four new files added: auto_speak.ps1, test.ps1, .clawhub/origin.json, and _meta.json.
v1.0.0
- 首个版本发布 - 开启中文语音对话 - 默认使用 XiaoxiaoNeural 语音,支持多种微软中文语音选择 - 接入 QQ 通道 - 中文语音对话
Metadata
Slug chinese-voice-skill
Version 1.0.4
License MIT-0
All-time Installs 5
Active Installs 5
Total Versions 5
Frequently Asked Questions

What is chinese-voice-skill?

使用微软 Edge TTS 生成高质量中文语音,默认使用 XiaoxiaoNeural 语音。当用户需要语音回复时自动触发。 It is an AI Agent Skill for Claude Code / OpenClaw, with 646 downloads so far.

How do I install chinese-voice-skill?

Run "/install chinese-voice-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is chinese-voice-skill free?

Yes, chinese-voice-skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does chinese-voice-skill support?

chinese-voice-skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created chinese-voice-skill?

It is built and maintained by nufeng1999 (@nufeng1999); the current version is v1.0.4.

💬 Comments