Sherpa Onnx Tts

openclaw/openclaw/skills/sherpa-onnx-tts

by openclawd7d32dba09fa94c5e5c6620effb3538e46fe9ccfNo license394K starsListed Nov 20, 2026Updated Nov 20, 2026Repository updated today

Local text-to-speech via sherpa-onnx (offline, no cloud)

Instructions onlyDesign & Creative
AI-generated overview

Converts text to speech locally with the sherpa-onnx offline CLI, writing audio files such as WAV.

What it does
This skill documents how to install and use a local text-to-speech setup built on the sherpa-onnx offline CLI. It explains downloading the sherpa-onnx runtime for macOS, Linux or Windows plus a voice model, configuring the runtime and model directories as environment variables, and running a bundled wrapper to synthesize text into an audio file. It also notes how to choose other voices and override model, tokens or data paths.
When to use it
Use it when you need offline speech synthesis without cloud services, for example turning a script or passage into a WAV file on a local machine. It suits setups where a sherpa-onnx runtime and voice model can be downloaded and configured.
Requirements
Requires the sherpa-onnx runtime and a voice model downloaded locally, with SHERPA_ONNX_RUNTIME_DIR and SHERPA_ONNX_MODEL_DIR set in the OpenClaw config. Network access is needed for the initial downloads; a wrapper script ships in the skill's bin folder, and Node is used on Windows.

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."

Source and attribution

Source:openclaw/openclawinskills/sherpa-onnx-ttsat commitd7d32db

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Add a badge to your README

Show readers this skill is listed on SourceWeft. The badge links to this page.

Preview of the “Listed on SourceWeft” badge
[![Listed on SourceWeft](https://sourceweft.com/badge/skills/gh-openclaw-openclaw-sherpa-onnx-tts-skills-sherpa-onnx-tts-3d439545eec437d7.svg)](https://sourceweft.com/skills/gh-openclaw-openclaw-sherpa-onnx-tts-skills-sherpa-onnx-tts-3d439545eec437d7?utm_source=readme&utm_medium=badge)

Report or request removal