← 返回
未分类 中文

Text to Voice Local

Local text-to-voice generation for OpenClaw workspaces using a canonical txt-to-mp3 pipeline. Use when the user wants to turn any prepared text into voice, a...
本地文本转语音生成,针对 OpenClaw 工作空间使用标准 txt‑to‑mp3 流程,适用于将任意准备好的文本转换为语音的场景。
betonimig
未分类 clawhub v1.4.0 1 版本 100000 Key: 无需
★ 1
Stars
📥 427
下载
💾 0
安装
1
版本
#latest

概述

Text to Voice Local

Use the bundled scripts to create one stable local text-to-voice path.

Goal

Produce voice from any text file with:

  • one canonical input text path,
  • one canonical output mp3 path,
  • one high-level wrapper for routine use,
  • low-level scripts for debugging only.

Canonical paths

Default input text:

  • tmp/text-to-voice-input.txt

Canonical output:

  • tmp/voice-mode-latest.mp3

State directory:

  • skills/text-to-voice-local/state/

State pointer:

  • skills/text-to-voice-local/state/last-output.txt

Main command

For normal use, run:

  • scripts/text_to_voice.sh voice [voice] [max_direct_chars]

Useful helpers:

  • scripts/text_to_voice.sh status
  • scripts/text_to_voice.sh voices

status now also checks runtime dependencies and prints install hints when something is missing.

Examples:

scripts/text_to_voice.sh text
scripts/text_to_voice.sh voice ./tmp/text-to-voice-input.txt
scripts/text_to_voice.sh voice ./tmp/text.txt ru-RU-SvetlanaNeural 280

What the scripts do

  • scripts/text_to_voice.sh
  • high-level entrypoint for normal use
  • scripts/tts_from_file.sh
  • one text file to one mp3
  • scripts/tts_from_file_chunked.sh
  • long text to multiple chunks and final merged mp3
  • scripts/voice_reply.sh
  • safe wrapper that updates canonical output and pointer
  • scripts/voice_reply_latest.sh
  • always refresh canonical latest mp3
  • state/text-to-voice.json
  • stores default voice, max chars, and canonical paths
  • scripts/edge_tts.js
  • low-level TTS helper used by the file wrappers

Install notes

Ensure these dependencies exist on the target machine:

  • node
  • ffmpeg
  • node-edge-tts

The skill checks these at runtime and, if something is missing, prints suggested install commands instead of failing silently.

Verify:

node -v
ffmpeg -version
node -e "require('node-edge-tts'); console.log('node-edge-tts ok')"

If node-edge-tts is missing:

npm i -g node-edge-tts

Setup steps on another OpenClaw

  1. Copy this skill folder into the target workspace skills directory.
  2. Make scripts executable.
  3. Ensure tmp/ exists.
  4. Put text into a txt file.
  5. Run the main command.

Minimal setup:

chmod +x skills/text-to-voice-local/scripts/*.sh
mkdir -p tmp
skills/text-to-voice-local/scripts/text_to_voice.sh voice ./tmp/text-to-voice-input.txt

Delivery rule

If the result is sent as Telegram voice, send only the canonical file:

  • ./tmp/voice-mode-latest.mp3

Prefer sending text and voice as separate messages.

Important constraint

Progress printed by shell scripts is useful in terminal diagnostics, but chat-side live progress editing depends on OpenClaw preview streaming, not shell stdout alone.

When to use low-level scripts

Use low-level scripts only for debugging or careful manual control.

Default to the high-level wrapper unless there is a reason not to.

版本历史

共 1 个版本

  • v1.4.0 当前
    2026-05-03 09:41 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,922
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 669 📥 324,254
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,359 📥 318,562