← 返回 Skills 市场
nufeng1999

chinese-voice-skill

作者 nufeng1999 · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ✓ 安全检测通过
646
总下载
0
收藏
5
当前安装
5
版本数
在 OpenClaw 中安装
/install chinese-voice-skill
功能描述
使用微软 Edge TTS 生成高质量中文语音,默认使用 XiaoxiaoNeural 语音。当用户需要语音回复时自动触发。
使用说明 (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 已安装(如需转换格式)
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install chinese-voice-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /chinese-voice-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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 通道 - 中文语音对话
元数据
Slug chinese-voice-skill
版本 1.0.4
许可证 MIT-0
累计安装 5
当前安装数 5
历史版本数 5
常见问题

chinese-voice-skill 是什么?

使用微软 Edge TTS 生成高质量中文语音,默认使用 XiaoxiaoNeural 语音。当用户需要语音回复时自动触发。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 646 次。

如何安装 chinese-voice-skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install chinese-voice-skill」即可一键安装,无需额外配置。

chinese-voice-skill 是免费的吗?

是的,chinese-voice-skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

chinese-voice-skill 支持哪些平台?

chinese-voice-skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 chinese-voice-skill?

由 nufeng1999(@nufeng1999)开发并维护,当前版本 v1.0.4。

💬 留言讨论