Thanks to visit codestin.com
Credit goes to lib.rs

#text-to-speech #bindings #piper

piper1-rs

Safe Rust bindings to Piper, the TTS library

1 unstable release

Uses new Rust 2024

0.1.0 Aug 19, 2025

#1453 in Audio

CC0 and GPL-3.0-only

5MB
5.5K SLoC

Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

piper1-rs

Rust bindings to libpiper.

These bindings use a fork of libpiper to fix several bugs in upstream.

Getting started

The build script sets two environment variables:

  • ONNX_RUNTIME_DIR: path to a directory containing lib/libonnxruntime.so and friends. This path defaults to /usr (most Linux distros should have /usr/lib/libonnxruntime.so if you install from distro packages).
  • ONNX_INCLUDE_PATH: path to a directory containing the ONNX runtime headers (in other words, onnxruntime_cxx_api.h should be in this directory) Defaults to /usr/include/onnxruntime (again, default path if you install from distro packages on Linux).

Troubleshooting

  • This doesn't work on macOS/Windows/something else!
    • All I have is Linux, I can't test anything else. Feel free to fix it yourself and send a pull request.

License

piper1-rs is under CC0-1.0, or public domain.

Piper itself is GPL licensed.

Piper models also have their own licensing, that varies by model.

Dependencies