Communitygithub.com

sundial-org/awesome-openclaw-skills

使用 node-edge-tts npm 套件將文字轉換為語音,支援多種語音、語言、速度調整、音高控制和字幕生成。

awesome-openclaw-skills 是什麼?

此技能使用 node-edge-tts npm 套件,透過 Microsoft Edge 的神經網路 TTS 服務,將文字轉換為高品質的語音。對於需要音頻或語音輸出的情境非常有用,例如「tts」觸發器或關鍵字出現時,或當內容需要用朗讀而非閱讀的方式呈現(例如多工處理、無障礙需求、開車或烹飪時)。它支援多種語言與聲音,可調整語速與音高,並能生成字幕。使用者可透過內建的 `tts` 工具快速轉換,或使用 `scripts/tts-converter.js` 腳本進行進階設定,包括指定聲音、語速、音高和輸出格式。技能也包含一個配置管理器 (`config-manager.js`),可儲存使用者偏好設定,無需每次重複指定參數。此技能主要為 Clawdbot 平台設計,但腳本也可獨立使用。特別的是,它會自動從要轉換的文字中過濾掉 TTS 相關的關鍵字(如 tts, TTS),避免將觸發詞也轉為音頻。

相容平台~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%, default)
  • --rate, -r:速率調整(例如:+10%, -20%, default)
  • --volume:音量調整(例如:+0%, -10%, default)
  • --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

NPM 套件配置,包含 node-edge-tts 依賴項。

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\<使用者>\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).

相關技能