Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

sherpa-onnx-tts — Claude Code skill: what it does, how to install

Offline text-to-speech CLI using sherpa-onnx without external cloud services. Converts text into WAV audio directly on your machine.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openclaw/openclaw --skill sherpa-onnx-tts -a claude-code
Open on GitHub

What sherpa-onnx-tts does

This skill runs sherpa-onnx locally to generate speech files from text. It works completely offline without sending requests to external APIs. By default, it targets the Piper en_US lessac (high) voice model, though you can override it using the --model-file, --tokens-file, or --data-dir options.

Setup requires downloading the sherpa-onnx v1.13.6 runtime for your operating system (macOS, Linux x64, or Windows x64) and extracting a voice model. You then set the SHERPA_ONNX_RUNTIME_DIR and SHERPA_ONNX_MODEL_DIR variables in ~/.openclaw/openclaw.json. On Windows, the wrapper runs via Node.js.

Install this if you need private, offline speech generation and want to avoid third-party API costs. If you lack local disk space for the runtime binary and model files, stick with cloud-based audio providers.

What it helps with

  • Generate WAV speech files from text without an internet connection
  • Run offline voice synthesis on macOS, Linux, or Windows
  • Switch local Piper ONNX voice models via command-line flags

Example prompts for the agent

  • Convert this text to ./tts.wav using sherpa-onnx-tts
  • Run sherpa-onnx-tts to speak "Hello from local TTS." into tts.wav

How to install sherpa-onnx-tts

1Skills CLI (Vercel)

npx skills add openclaw/openclaw --skill sherpa-onnx-tts -a claude-code

2Manually: put the files in place

~/.claude/skills/sherpa-onnx-tts/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/sherpa-onnx-tts/

From the same set45

The whole set →
summarize openclaw Runs a CLI tool to summarize or transcribe web articles, YouTube videos, podcasts, and local PDF documents directly within your AI assistant. Claude Code CX Codex Cursor +1 26,900installs weather openclaw This skill fetches current conditions and forecasts for a city, region, airport code, or coordinates. Use it to check rain and temperature or plan a trip. Claude Code CX Codex Cursor +1 9,300installs gog openclaw Guides an agent using the gog CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. Use it when Google Workspace tasks need to run from a terminal. Claude Code CX Codex Cursor +1 8,500installs tmux openclaw Lets an agent work with live tmux sessions: read pane output, send keys and text, wait for a prompt line to show up. Claude Code CX Codex Cursor +1 8,400installs openai-whisper openclaw This skill lets your agent call the Whisper CLI to transcribe audio on your own machine. No API key needed. Claude Code CX Codex Cursor +1 7,100installs nano-pdf openclaw Edit PDF pages with plain text instructions through the nano-pdf CLI. Useful when you need to fix a typo or swap a heading without leaving your terminal. Claude Code CX Codex Cursor +1 7,100installs skill-creator openclaw A skill for writing, repairing and reviewing other skills. It splits behaviour into branches, sets the frontmatter and sorts resources into folders. Useful once your skill folder gets crowded. Claude Code CX Codex Cursor +1 6,700installs coding-agent openclaw This skill sends large coding tasks to Codex, Claude Code, or OpenCode as background workers. Use it for refactors, PR reviews, and issue-to-PR work. Claude Code CX Codex Cursor +1 6,500installs

Similar

Questions about sherpa-onnx-tts

How do I install sherpa-onnx-tts in Claude Code?

Run npx skills add openclaw/openclaw --skill sherpa-onnx-tts -a claude-code. Next, download the sherpa-onnx runtime and your chosen model into the OpenClaw tools directory.

Which environment variables are required?

You must configure SHERPA_ONNX_RUNTIME_DIR pointing to the runtime folder and SHERPA_ONNX_MODEL_DIR pointing to your extracted voice model.

Can I use a custom voice model?

Yes. Download a model archive from the sherpa-onnx repository and pass --model-file, --tokens-file, or --data-dir to point to specific model files.

Source text

SKILL.md · MIT
---
name: sherpa-onnx-tts
description: "Local text-to-speech via sherpa-onnx (offline, no cloud)"
metadata:
  {
    "openclaw":
      {
        "emoji": "🔉",
        "os": ["darwin", "linux", "win32"],
        "requires": { "env": ["SHERPA_ONNX_RUNTIME_DIR", "SHERPA_ONNX_MODEL_DIR"] },
        "install":
          [
            {
              "id": "download-runtime-macos",
              "kind": "download",
              "os": ["darwin"],
              "url": "https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.13.6/sherpa-onnx-v1.13.6-osx-universal2-shared.tar.bz2",
              "sha256": "05ed5839bbdfb2da36bb9095961e6b4cfa470d55e29a9795100627dbc36df2ba",
              "archive": "tar.bz2",
              "extract": true,
              "stripComponents": 1,
              "targetDir": "runtime",
              "label": "Download sherpa-onnx runtime (macOS)",
            },
            {
              "id": "download-runtime-linux-x64",
              "kind": "download",
              "os": ["linux"],
              "url": "https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.13.6/sherpa-onnx-v1.13.6-linux-x64-shared.tar.bz2",
              "sha256": "58cc7d360fdedf9702954e8b585eb400bbee8668484bf25e4461d5d22ba439d8",
              "archive": "tar.bz2",
              "extract": true,
              "stripComponents": 1,
              "targetDir": "runtime",
              "label": "Download sherpa-onnx runtime (Linux x64)",
            },
            {
              "id": "download-runtime-win-x64",
              "kind": "download",
              "os": ["win32"],
              "url": "https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.13.6/sherpa-onnx-v1.13.6-win-x64-shared-MD-Release.tar.bz2",
              "sha256": "27efaed17a64a40fd3059ac24195dcf4ec0521c999906d288cc5107cbbf4cedc",
              "archive": "tar.bz2",
              "extract": true,
              "stripComponents": 1,
              "targetDir": "runtime",
              "label": "Download sherpa-onnx runtime (Windows x64)",
            },
            {
              "id": "download-model-lessac",
              "kind": "download",
              "url": "https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-lessac-high.tar.bz2",
              "archive": "tar.bz2",
              "extract": true,
              "targetDir": "models",
              "label": "Download Piper en_US lessac (high)",
            },
          ],
      },
  }
---

# sherpa-onnx-tts

Local TTS using the sherpa-onnx offline CLI.

## Install

1. Download the runtime for your OS (extracts into `$OPENCLAW_STATE_DIR/tools/sherpa-onnx-tts/runtime`, default `~/.openclaw/tools/sherpa-onnx-tts/runtime`)
2. Download a voice model (extracts into `$OPENCLAW_STATE_DIR/tools/sherpa-onnx-tts/models`, default `~/.openclaw/tools/sherpa-onnx-tts/models`)

Resolve the active state directory first:

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

Then write those resolved paths into the active OpenClaw config file (`$OPENCLAW_CONFIG_PATH`, default `~/.openclaw/openclaw.json`):

```json5
{
  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",
        },
      },
    },
  },
}
```

The wrapper lives in this skill folder. Run it directly, or add the wrapper to PATH:

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

## Usage

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

Notes:

- Pick a different model from the sherpa-onnx `tts-models` release if you want another voice.
- If the model dir has multiple `.onnx` files, set `SHERPA_ONNX_MODEL_FILE` or pass `--model-file`.
- You can also pass `--tokens-file` or `--data-dir` to override the defaults.
- Windows: run `node {baseDir}\\bin\\sherpa-onnx-tts -o tts.wav "Hello from local TTS."`

© openclaw · MIT · openclaw/openclaw

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor