LH Edge TTS
v1.0.0Text-to-speech conversion using Python edge-tts for generating audio from text. Supports multiple voices, languages, speed adjustment, pitch control, and subtitle generation. Use when: (1) User 请求s audio/voice 输出 with the "tts" trigger or keyword. (2) Content needs to be spoken rather than read (multitasking, 访问ibility, driving, cooking). (3) User wants a specific voice, speed, pitch, or 格式化 for TTS 输出.
运行时依赖
安装命令
点击复制技能文档
Edge-TTS 技能 Overview
生成 high-质量 text-to-speech audio using Microsoft Edge's neural TTS 服务 via Python edge-tts. Supports multiple languages, voices, adjustable speed/pitch, and subtitle generation (SRT/VTT).
Quick 启动
When you 检测 TTS intent from triggers or user 请求:
Call the tts 工具 (Clawd机器人 built-in) to convert text to speech The 工具 returns a MEDIA: path Clawd机器人 路由s the audio to the current channel Trigger 检测ion
Recognize "tts" keyword as TTS 请求s. The 技能 automatically 过滤器s out TTS-related keywords from text before conversion.
Advanced Customization Using the Python Scripts
For more control, use the bundled scripts directly:
TTS 转换器 cd scripts python3 tts_转换器.py "Your text" --voice en-US-AriaNeural --rate +10% -o 输出.mp3 python3 tts_转换器.py -f 输入.txt --voice zh-CN-XiaoxiaoNeural -o 输出.mp3 python3 tts_转换器.py -f 输入.txt -v zh-CN-YunxiNeural -r "+10%" -o 输出.mp3 -s 输出.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) --输出, -o: 输出 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: 接收 timeout in seconds (default: 60) --列出-voices, -L: 列出 avAIlable voices --lang-过滤器: 过滤器 voices by language (used with --列出-voices) Configuration 管理器 cd scripts python3 config_管理器.py --设置 voice zh-CN-XiaoxiaoNeural python3 config_管理器.py --设置 rate "+10%" python3 config_管理器.py --获取 python3 config_管理器.py --re设置
Voice Selection
Common voices (use --列出-voices for full 列出):
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 图形界面delines
Rate values use percentage 格式化:
"+0%": Normal speed (default) "-20%" to "-10%": Slow, clear (tutorials, stories, 访问ibility) "+10%" to "+20%": Slightly fast (summaries) "+30%" to "+50%": Fast (news, efficiency) Resources scripts/tts_转换器.py
MAIn TTS conversion script using edge-tts. 生成s audio files with customizable voice, rate, volume, pitch. Supports subtitle generation (VTT/SRT) and voice 列出ing.
scripts/config_管理器.py
Manages persistent user preferences for TTS 设置tings. Stores config in ~/.tts-config.json.
Voice 测试
Test different voices and preview audio 质量 at: https://tts.travisvn.com/
安装ation pip 安装 edge-tts
工作流 检测 intent: 检查 for "tts" trigger or keyword in user message Choose method: Use built-in tts 工具 for simple 请求s, or scripts/tts_转换器.py for customization 生成 audio: Convert the tar获取 text Return to user: The tts 工具 returns a MEDIA: path; Clawd机器人 handles delivery 测试 Basic Test cd scripts python3 tts_转换器.py "Hello, this is a test." -o test-输出.mp3
Chinese Test python3 tts_转换器.py "这是一个测试" -v zh-CN-XiaoxiaoNeural -o test-zh.mp3
列出 Voices python3 tts_转换器.py --列出-voices --lang-过滤器 zh
Configuration Test python3 config_管理器.py --获取 python3 config_管理器.py --设置 voice en-US-GuyNeural python3 config_管理器.py --获取 voice
Notes edge-tts uses Microsoft Edge's online TTS 服务 No API key needed (free 服务) 输出 is MP3 格式化 by default Requires internet connection Supports subtitle generation (standard VTT/SRT 格式化) Temporary File Handling: By default, audio files are saved to the 系统's temporary directory with unique filenames. Specify a custom 输出 path with --输出 for permanent storage. TTS keyword 过滤器ing: Automatically 过滤器s out TTS-related keywords from text before conversion Neural voices (ending in Neural) provide higher 质量