Communitygithub.com

sundial-org/awesome-openclaw-skills

使用 node-edge-tts npm 包进行文本到语音转换,支持多种声音、语言、速度调节、音调控制和字幕生成。

awesome-openclaw-skills 是什么?

该技能利用 Microsoft Edge 的神经 TTS 服务,通过 node-edge-tts npm 包提供高质量的文本到语音转换功能。它支持多种语言和声音,允许用户调节语速、音调和音量,并可生成带有单词级时间戳的字幕(JSON 格式)。技能提供了两种使用方式:一是通过内置的 `tts` 工具快速转换;二是使用附带的 Node.js 脚本(如 `tts-converter.js` 和 `config-manager.js`)进行高级定制,支持代理设置、输出格式选择和配置持久化。适用于需要语音输出的场景,如多任务处理、无障碍访问、驾驶或烹饪时听取内容。该技能在 Clawdbot 平台上运行,无需 API 密钥,但需要网络连接。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/sundial-org/awesome-openclaw-skills/tree/HEAD/skills/edge-tts

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Edge-TTS 技能

概述

使用 node-edge-tts npm 包,通过 Microsoft Edge 的神经 TTS 服务生成高质量的文本到语音音频。支持多种语言、声音、可调节的速度/音调以及字幕生成。

快速开始

当您从触发器或用户请求中检测到 TTS 意图时:

  1. 调用 tts 工具(Clawdbot 内置)将文本转换为语音
  2. 该工具返回一个 MEDIA: 路径
  3. Clawdbot 将音频路由到当前频道
// 示例:内置 tts 工具用法
tts("您要转换为语音的文本")
// 返回:MEDIA: /path/to/audio.mp3

触发器检测

识别 "tts" 关键字作为 TTS 请求。该技能会自动从文本中过滤掉与 TTS 相关的关键字,避免将触发词本身转换为音频。

高级定制

使用 Node.js 脚本

如需更多控制,可直接使用附带的脚本:

TTS 转换器

cd scripts
npm install
node tts-converter.js "您的文本" --voice en-US-AriaNeural --rate +10% --output output.mp3

选项:

  • --voice, -v:声音名称(默认:en-US-AriaNeural)
  • --lang, -l:语言代码(例如 en-US, es-ES)
  • --format, -o:输出格式(默认:audio-24khz-48kbitrate-mono-mp3)
  • --pitch:音调调整(例如 +10%, -20%,默认)
  • --rate, -r:语速调整(例如 +10%, -20%,默认)
  • --volume:音量调整(例如 +0%, -10%,默认)
  • --save-subtitles, -s:将字幕保存为 JSON 文件
  • --output, -f:输出文件路径(默认:tts_output.mp3)
  • --proxy, -p:代理 URL(例如 http://localhost:7890)
  • --timeout:请求超时时间(毫秒,默认:10000)
  • --list-voices, -L:列出可用声音

配置管理器

cd scripts
npm install
node config-manager.js --set-voice en-US-AriaNeural

node config-manager.js --set-rate +10%

node config-manager.js --get

node config-manager.js --reset

声音选择

常用声音(使用 --list-voices 查看完整列表):

英语:

  • en-US-MichelleNeural(女声,自然,默认)
  • en-US-AriaNeural(女声,自然)
  • en-US-GuyNeural(男声,自然)
  • en-GB-SoniaNeural(女声,英式)
  • en-GB-RyanNeural(男声,英式)

其他语言:

  • es-ES-ElviraNeural(西班牙语,西班牙)
  • fr-FR-DeniseNeural(法语)
  • de-DE-KatjaNeural(德语)
  • ja-JP-NanamiNeural(日语)
  • zh-CN-XiaoxiaoNeural(中文)
  • ar-SA-ZariyahNeural(阿拉伯语)

语速指南

语速值使用百分比格式:

  • "default":正常速度
  • "-20%" 至 "-10%":慢速、清晰(教程、故事、无障碍)
  • "+10%" 至 "+20%":稍快(摘要)
  • "+30%" 至 "+50%":快速(新闻、效率)

输出格式

根据使用场景选择音频质量:

  • audio-24khz-48kbitrate-mono-mp3:标准质量(语音笔记、消息)
  • audio-24khz-96kbitrate-mono-mp3:高质量(演示、内容)
  • audio-48khz-96kbitrate-stereo-mp3:最高质量(专业音频、音乐)

资源

scripts/tts-converter.js

主要的 TTS 转换脚本,使用 node-edge-tts。生成可自定义语音、语速、音量、音调和格式的音频文件。支持字幕生成和声音列表。

scripts/config-manager.js

管理用户对 TTS 设置(语音、语言、格式、音调、语速、音量)的持久化偏好。配置存储在 ~/.tts-config.json 中。

scripts/package.json

包含 node-edge-tts 依赖的 NPM 包配置。

references/node_edge_tts_guide.md

node-edge-tts npm 包的完整文档,包括:

  • 按语言分类的完整声音列表
  • 韵律选项(语速、音调、音量)
  • 使用示例(CLI 和模块)
  • 字幕生成
  • 输出格式
  • 最佳实践和限制

声音测试

在 https://tts.travisvn.com/ 测试不同的声音并预览音频质量。

当您需要特定声音的详细信息或高级功能时,请参考此文档。

安装

要使用附带的脚本:

cd /home/user/clawd/skills/public/tts-skill/scripts
npm install

这将安装:

  • node-edge-tts - TTS 库
  • commander - CLI 参数解析

工作流程

  1. 检测意图:检查用户消息中的 "tts" 触发器或关键字
  2. 选择方法:简单请求使用内置的 tts 工具,需要定制时使用 scripts/tts-converter.js
  3. 生成音频:转换目标文本(消息、搜索结果、摘要)
  4. 返回给用户:tts 工具返回 MEDIA: 路径;Clawdbot 处理交付

测试

基本测试

运行测试脚本以验证 TTS 功能:

cd /home/user/clawd/skills/public/edge-tts/scripts
npm test

这将生成一个测试音频文件并验证 TTS 服务是否正常工作。

声音测试

在 https://tts.travisvn.com/ 测试不同的声音并预览音频质量。

集成测试

使用内置的 tts 工具进行快速测试:

// 示例:使用默认设置测试 TTS
tts("这是对 TTS 功能的测试。")

配置测试

验证配置持久化:

cd /home/user/clawd/skills/public/edge-tts/scripts
node config-manager.js --get
node config-manager.js --set-voice en-US-GuyNeural
node config-manager.js --get

故障排除

  • 测试连接:运行 npm test 检查 TTS 服务是否可访问
  • 检查声音可用性:使用 node tts-converter.js --list-voices 查看可用声音
  • 验证代理设置:如果使用代理,请使用 node tts-converter.js "test" --proxy http://localhost:7890 测试
  • 检查音频输出:测试应在 scripts 目录中生成 test-output.mp3

备注

  • node-edge-tts 使用 Microsoft Edge 的在线 TTS 服务(已更新,正常工作认证)
  • 无需 API 密钥(免费服务)
  • 输出默认为 MP3 格式
  • 需要网络连接
  • 支持字幕生成(JSON 格式,带有单词级时间戳)
  • 临时文件处理:默认情况下,音频文件保存到系统的临时目录(Unix 上为 /tmp/edge-tts-temp/,Windows 上为 C:\Users\<user>\AppData\Local\Temp\edge-tts-temp\),文件名唯一(例如 tts_1234567890_abc123.mp3)。文件不会自动删除——调用应用程序(Clawdbot)应在使用后自行清理。如果需要永久存储,可以使用 --output 选项指定自定义输出路径。
  • TTS 关键字过滤:该技能会自动从文本中过滤掉与 TTS 相关的关键字(tts, TTS, text-to-speech),避免将触发词本身转换为音频
  • 对于重复的偏好设置,请使用 config-manager.js 设置默认值
  • 默认声音:en-US-MichelleNeural(女声,自然)
  • 神经声音(以 Neural 结尾)比标准声音提供更高质量

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

sundial-org/awesome-openclaw-skills

Complete X (Twitter) algorithm mastery - engagement weights, viral formulas, shadow ban avoidance, thread optimization, and growth strategies. Based on X's open-source code analysis and real creator data.

sundial-org/awesome-openclaw-skills

Create product demo videos by automating browser interactions and capturing frames. Use when the user wants to record a demo, walkthrough, product showcase, or interactive video of a web application. Supports Playwright CDP screencast for high-quality capture and FFmpeg for video encoding.

sundial-org/awesome-openclaw-skills

Comprehensive video/audio processing with FFmpeg. Use for: (1) Video transcoding and format conversion, (2) Cutting and merging clips, (3) Audio extraction and manipulation, (4) Thumbnail and GIF generation, (5) Resolution scaling and quality adjustment, (6) Adding subtitles or watermarks, (7) Speed adjustment (slow/fast motion), (8) Color correction and filters.

sundial-org/awesome-openclaw-skills

Generate FFmpeg commands from natural language video editing requests - cut, trim, convert, compress, change aspect ratio, extract audio, and more.

sundial-org/awesome-openclaw-skills

Create a verbatim transcript for a YouTube URL using Google Gemini (speaker labels, paragraph breaks; no time codes). Use when the user asks to transcribe a YouTube video or wants a clean transcript (no timestamps).

sundial-org/awesome-openclaw-skills

Generate landing page code from product descriptions

sundial-org/awesome-openclaw-skills

Generate a beautiful HTML landing page from your package.json. Use when you need a quick marketing page for your project.

sundial-org/awesome-openclaw-skills

Founder vs employee personal branding strategies with LinkedIn positioning and exit planning

sundial-org/awesome-openclaw-skills

Monitor stock/crypto holdings, get price alerts, track portfolio performance

sundial-org/awesome-openclaw-skills

End-to-end AI video generation - create videos from text prompts using image generation, video synthesis, voice-over, and editing. Supports OpenAI DALL-E, Replicate models, LumaAI, Runway, and FFmpeg editing.

sundial-org/awesome-openclaw-skills

Local speech-to-text using faster-whisper. 4-6x faster than OpenAI Whisper with identical accuracy; GPU acceleration enables ~20x realtime transcription. Supports standard and distilled models with word-level timestamps.

sundial-org/exa-web-search-free

Free AI search via Exa MCP. Web search for news/info, code search for docs/examples from GitHub/StackOverflow, company research for business intel. No API key needed.

sundial-org/finance-news

Market news briefings with AI summaries. Use when asked about stock news, market updates, portfolio performance, morning/evening briefings, financial headlines, or price alerts. Supports US/Europe/Japan markets, WhatsApp delivery, and English/German output.

sundial-org/jina-reader

Web content extraction via Jina AI Reader API. Three modes: read (URL to markdown), search (web search + full content), ground (fact-checking). Extracts clean content without exposing server IP.

sundial-org/memory-setup

Enable and configure Moltbot/Clawdbot memory search for persistent context. Use when setting up memory, fixing "goldfish brain," or helping users configure memorySearch in their config. Covers MEMORY.md, daily logs, and vector search setup.

sundial-org/news-summary

This skill should be used when the user asks for news updates, daily briefings, or what's happening in the world. Fetches news from trusted international RSS feeds and can create voice summaries.

sundial-org/ontology

Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.

sundial-org/remind-me

Set reminders using natural language. Automatically creates one-time cron jobs and logs to markdown.

sundial-org/stock-market-pro

Professional stock price tracking, fundamental analysis, and financial reporting tool. Supports global markets (US, KR, etc.), Crypto, and Forex with real-time data. (1) Real-time quotes, (2) Valuation metrics (PE, EPS, ROE), (3) Earnings calendar and consensus, (4) High-quality Candlestick & Line charts with technical indicators (MA5/20/60).

相关技能