#text-to-speech #embedding #diarization

sherpa-rs

Rust bindings to https://github.com/k2-fsa/sherpa-onnx

40 releases

0.6.8 Oct 5, 2025
0.6.6 Feb 25, 2025
0.6.1 Dec 25, 2024
0.5.1 Oct 25, 2024
0.1.7-beta.0 Jul 13, 2024

#185 in Audio

Download history 144/week @ 2025-09-23 343/week @ 2025-09-30 302/week @ 2025-10-07 261/week @ 2025-10-14 205/week @ 2025-10-21 287/week @ 2025-10-28 470/week @ 2025-11-04 165/week @ 2025-11-11 206/week @ 2025-11-18 380/week @ 2025-11-25 237/week @ 2025-12-02 192/week @ 2025-12-09 226/week @ 2025-12-16 95/week @ 2025-12-23 133/week @ 2025-12-30 125/week @ 2026-01-06

625 downloads per month

MIT license

3MB
72K SLoC

C++ 41K SLoC // 0.0% comments Kotlin 14K SLoC // 0.1% comments Dart 4.5K SLoC // 0.0% comments Java 4.5K SLoC // 0.0% comments C 3K SLoC // 0.2% comments Rust 3K SLoC // 0.0% comments Batch 1K SLoC Prolog 305 SLoC Python 161 SLoC // 0.1% comments TypeScript 67 SLoC Shell 37 SLoC Forge Config 1 SLoC

sherpa-rs

Crates License

Rust bindings to sherpa-onnx

Features

  • Spoken language detection
  • Speaker embedding (labeling)
  • Speaker diarization
  • Speech to text
  • Text to speech
  • Text punctuation
  • Voice activity detection
  • Audio tagging
  • Keyword spotting

Supported Platforms

  • Windows
  • Linux
  • macOS
  • Android
  • IOS

Install

cargo add sherpa-rs

Build

Please see BUILDING.md.

Feature flags

  • cuda: enable CUDA support
  • directml: enable DirectML support
  • tts: enable TTS
  • download-binaries: use prebuilt sherpa-onnx libraries for faster builds. cached.
  • static: use static sherpa-onnx libraries and link them statically.
  • sys: expose raw c bindings (sys crate)

Documentation

For the documentation on sherpa_rs, please visit docs.rs/sherpa_rs.

For documentation on sherpa-onnx, refer to the sherpa/intro.html.

Examples

See examples

Models

All pretrained models available at sherpa/onnx/pretrained_models

Dependencies

~5–11MB
~112K SLoC