Community编程与开发github.com

sherpa-onnx-tts

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

sherpa-onnx-tts 是什么?

sherpa-onnx-tts 是一个基于 sherpa-onnx 离线 CLI 的本地文本转语音(TTS)技能。它允许开发者和 AI 代理在完全不依赖云服务的情况下,将文本转换为语音,从而保护隐私并降低延迟。该技能支持在 OpenClaw 生态系统中运行,通过简单的环境变量配置即可集成。用户需要下载运行时和语音模型,并通过脚本或命令行直接调用。支持的平台包括 Linux、macOS 和 Windows,通过统一接口 `sherpa-onnx-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, Grok Build, 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 and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相关技能