Community编程与开发github.com

sherpa-onnx-tts

通过 sherpa-onnx 实现本地文本转语音(离线,无需云端)

sherpa-onnx-tts 是什么?

sherpa-onnx-tts 是一个基于 sherpa-onnx 离线 CLI 的本地文本转语音技能,完全离线运行,无需依赖任何云端服务。它通过下载 sherpa-onnx 运行时和语音模型,在本地完成文本到语音的转换,支持多种语音模型选择。该技能适用于所有主流操作系统(包括 Linux、macOS 和 Windows),并提供了灵活的环境变量配置(如 SHERPA_ONNX_RUNTIME_DIR 和 SHERPA_ONNX_MODEL_DIR)以及 CLI 参数(如 --model-file、--tokens-file),方便开发者自定义模型路径和选项。用户可以通过简单的命令行调用生成 WAV 格式的语音文件,非常适合需要低延迟、隐私保护或离线环境的 TTS 应用场景。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/skills/sherpa-onnx-tts

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

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

文档

sherpa-onnx-tts 是做什么的?

使用 sherpa-onnx 离线 CLI 进行本地文本转语音。

安装

  1. 下载对应操作系统的运行时(解压到 $OPENCLAW_STATE_DIR/tools/sherpa-onnx-tts/runtime,默认 ~/.openclaw/tools/sherpa-onnx-tts/runtime)
  2. 下载一个语音模型(解压到 $OPENCLAW_STATE_DIR/tools/sherpa-onnx-tts/models,默认 ~/.openclaw/tools/sherpa-onnx-tts/models)

首先解析活跃状态目录:

STATE_DIR="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"

然后将解析后的路径写入活跃的 OpenClaw 配置文件($OPENCLAW_CONFIG_PATH,默认 ~/.openclaw/openclaw.json):

{
  skills: {
    entries: {
      "sherpa-onnx-tts": {
        env: {
          SHERPA_ONNX_RUNTIME_DIR: "/path/to/your/state-dir/tools/sherpa-onnx-tts/runtime",
          SHERPA_ONNX_MODEL_DIR: "/path/to/your/state-dir/tools/sherpa-onnx-tts/models/vits-piper-en_US-lessac-high",
        },
      },
    },
  },
}

包装脚本位于此技能文件夹内。可以直接运行,或者将其添加到 PATH 环境变量中:

export PATH="{baseDir}/bin:$PATH"

用法

{baseDir}/bin/sherpa-onnx-tts -o ./tts.wav "Hello from local TTS."

注意事项:

  • 如果想使用其他声音,可以从 sherpa-onnx 的 tts-models 发布版本中选择另一个模型。
  • 如果模型目录中有多个 .onnx 文件,请设置 SHERPA_ONNX_MODEL_FILE 或传递 --model-file 参数。
  • 你也可以传递 --tokens-file 或 --data-dir 来覆盖默认值。
  • Windows 系统:运行 node {baseDir}\bin\sherpa-onnx-tts -o tts.wav "Hello from local TTS."

Individual skills in this repo

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

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

相关技能