← 返回 Skills 市场
liuhedev

LH Edge TTS

作者 liuhedev · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
927
总下载
0
收藏
6
当前安装
2
版本数
在 OpenClaw 中安装
/install lh-edge-tts
功能描述
Text-to-speech conversion using Python edge-tts for generating audio from text. Supports multiple voices, languages, speed adjustment, pitch control, and sub...
使用说明 (SKILL.md)

Edge-TTS Skill

Overview

Generate high-quality text-to-speech audio using Microsoft Edge's neural TTS service via Python edge-tts. Supports multiple languages, voices, adjustable speed/pitch, and subtitle generation (SRT/VTT).

Quick Start

When you detect TTS intent from triggers or user request:

  1. Call the tts tool (Clawdbot built-in) to convert text to speech
  2. The tool returns a MEDIA: path
  3. Clawdbot routes the audio to the current channel

Trigger Detection

Recognize "tts" keyword as TTS requests. The skill automatically filters out TTS-related keywords from text before conversion.

Advanced Customization

Using the Python Scripts

For more control, use the bundled scripts directly:

TTS Converter

cd scripts
python3 tts_converter.py "Your text" --voice en-US-AriaNeural --rate +10% -o output.mp3
python3 tts_converter.py -f input.txt --voice zh-CN-XiaoxiaoNeural -o output.mp3
python3 tts_converter.py -f input.txt -v zh-CN-YunxiNeural -r "+10%" -o output.mp3 -s output.vtt

Options:

  • --voice, -v: Voice name (default: en-US-MichelleNeural)
  • --lang, -l: Language code (e.g., en-US, zh-CN)
  • --rate, -r: Rate adjustment (e.g., +10%, -20%)
  • --volume: Volume adjustment (e.g., +0%, -50%)
  • --pitch: Pitch adjustment (e.g., +0Hz, -10Hz)
  • --output, -o: Output file path (default: temp file)
  • --subtitles, -s: Save subtitles to file (.vtt or .srt)
  • --file, -f: Read text from file
  • --proxy, -p: Proxy URL
  • --timeout: Receive timeout in seconds (default: 60)
  • --list-voices, -L: List available voices
  • --lang-filter: Filter voices by language (used with --list-voices)

Configuration Manager

cd scripts
python3 config_manager.py --set voice zh-CN-XiaoxiaoNeural
python3 config_manager.py --set rate "+10%"
python3 config_manager.py --get
python3 config_manager.py --reset

Voice Selection

Common voices (use --list-voices for full list):

English:

  • en-US-MichelleNeural (female, natural, default)
  • en-US-AriaNeural (female, natural)
  • en-US-GuyNeural (male, natural)
  • en-GB-SoniaNeural (female, British)
  • en-GB-RyanNeural (male, British)

Chinese:

  • zh-CN-XiaoxiaoNeural (female)
  • zh-CN-YunyangNeural (male, news style)
  • zh-CN-YunxiNeural (male, natural)

Other Languages:

  • es-ES-ElviraNeural (Spanish)
  • fr-FR-DeniseNeural (French)
  • de-DE-KatjaNeural (German)
  • ja-JP-NanamiNeural (Japanese)
  • ar-SA-ZariyahNeural (Arabic)

Rate Guidelines

Rate values use percentage format:

  • "+0%": Normal speed (default)
  • "-20%" to "-10%": Slow, clear (tutorials, stories, accessibility)
  • "+10%" to "+20%": Slightly fast (summaries)
  • "+30%" to "+50%": Fast (news, efficiency)

Resources

scripts/tts_converter.py

Main TTS conversion script using edge-tts. Generates audio files with customizable voice, rate, volume, pitch. Supports subtitle generation (VTT/SRT) and voice listing.

scripts/config_manager.py

Manages persistent user preferences for TTS settings. Stores config in ~/.tts-config.json.

Voice Testing

Test different voices and preview audio quality at: https://tts.travisvn.com/

Installation

pip install edge-tts

Workflow

  1. Detect intent: Check for "tts" trigger or keyword in user message
  2. Choose method: Use built-in tts tool for simple requests, or scripts/tts_converter.py for customization
  3. Generate audio: Convert the target text
  4. Return to user: The tts tool returns a MEDIA: path; Clawdbot handles delivery

Testing

Basic Test

cd scripts
python3 tts_converter.py "Hello, this is a test." -o test-output.mp3

Chinese Test

python3 tts_converter.py "这是一个测试" -v zh-CN-XiaoxiaoNeural -o test-zh.mp3

List Voices

python3 tts_converter.py --list-voices --lang-filter zh

Configuration Test

python3 config_manager.py --get
python3 config_manager.py --set voice en-US-GuyNeural
python3 config_manager.py --get voice

Notes

  • edge-tts uses Microsoft Edge's online TTS service
  • No API key needed (free service)
  • Output is MP3 format by default
  • Requires internet connection
  • Supports subtitle generation (standard VTT/SRT format)
  • Temporary File Handling: By default, audio files are saved to the system's temporary directory with unique filenames. Specify a custom output path with --output for permanent storage.
  • TTS keyword filtering: Automatically filters out TTS-related keywords from text before conversion
  • Neural voices (ending in Neural) provide higher quality
安全使用建议
This skill appears to be what it claims: a thin wrapper around the edge-tts library. Things to consider before installing: (1) text you convert is sent to Microsoft Edge's online TTS service (no API key required), so avoid sending sensitive PII if you need it kept private; (2) the skill writes a config file (~/.tts-config.json) and temporary audio files to the system temp directory—clean up if you want no persistent artifacts; (3) the proxy option can route requests through a custom endpoint only if you supply it—do not point it to unknown or untrusted proxies. If you need stronger privacy guarantees, test with non-sensitive text or inspect network activity before broad use.
功能分析
Type: OpenClaw Skill Name: lh-edge-tts Version: 1.0.0 The skill is classified as suspicious due to several high-risk capabilities that are explicitly documented in SKILL.md and implemented in `scripts/tts_converter.py` and `scripts/config_manager.py`. Specifically, `tts_converter.py` allows reading arbitrary files via `--file` and writing to arbitrary paths via `--output` and `--subtitles`. Both `tts_converter.py` and `config_manager.py` support configuring a network proxy via `--proxy`. While these features may have legitimate uses, they present significant prompt injection vulnerabilities, allowing an AI agent to be instructed to read sensitive files, overwrite critical system/user files, or route network traffic through an attacker-controlled proxy without clear malicious intent in the code itself.
能力评估
Purpose & Capability
Name/description claim Microsoft Edge neural TTS via Python edge-tts; included scripts and install.sh explicitly use edge-tts and provide voice/rate/pitch/subtitle features—requirements are proportional to the described TTS functionality.
Instruction Scope
SKILL.md and the scripts confine behavior to converting text to audio, listing voices, and managing a local config. Instructions reference only the built-in tts tool, the included scripts, and the edge-tts service. No instructions ask the agent to read unrelated system files or exfiltrate data.
Install Mechanism
Installation is a simple pip install edge-tts invoked by install.sh and documented in SKILL.md; this is an expected, low-risk install method for a Python-based TTS wrapper.
Credentials
The skill requests no environment variables or credentials. It stores user preferences in ~/.tts-config.json and writes temporary audio files to a temp directory—both are reasonable for this feature. The proxy option is user-controlled (not required).
Persistence & Privilege
The skill does not request always:true, does not modify other skills, and only persists its own config in the user's home directory. It runs on-demand and does not demand elevated/system-wide privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lh-edge-tts
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lh-edge-tts 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Text-to-speech with Microsoft Edge voices
v0.1.0
Initial release of lh-edge-tts: a feature-rich text-to-speech skill using Python edge-tts. - Converts text to high-quality audio with support for multiple voices and languages. - Allows adjustment of speed, pitch, and volume; includes options for subtitle file generation (VTT/SRT). - Built-in TTS intent detection with keyword filtering. - Command-line scripts provided for advanced use and configuration management. - No API key required; utilizes Microsoft Edge’s online neural TTS service.
元数据
Slug lh-edge-tts
版本 1.0.0
许可证
累计安装 6
当前安装数 6
历史版本数 2
常见问题

LH Edge TTS 是什么?

Text-to-speech conversion using Python edge-tts for generating audio from text. Supports multiple voices, languages, speed adjustment, pitch control, and sub... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 927 次。

如何安装 LH Edge TTS?

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

LH Edge TTS 是免费的吗?

是的,LH Edge TTS 完全免费(开源免费),可自由下载、安装和使用。

LH Edge TTS 支持哪些平台?

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

谁开发了 LH Edge TTS?

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

💬 留言讨论