vosk-rs

Library Listed Dormant

Safe wrapper around the Vosk API Speech Recognition Toolkit

Checked · Sources

Downloads
7,299
Dependents
4
Stars
182
Forks
16
Contributors
8
Commits
136
Latest release
0.3.1 ·

About

From the project README ·

Safe FFI bindings around the Vosk API Speech Recognition Toolkit.

Usage

// Simplified version of examples/read_wav.rs

// Normally you would not want to hardcode the audio samples
let samples = vec![100, -2, 700, 30, 4, 5];
let model_path = "/path/to/model";

let model = Model::new(model_path).unwrap();
let mut recognizer = Recognizer::new(&model, 16000.0).unwrap();

recognizer.set_max_alternatives(10);
recognizer.set_words(true);
recognizer.set_partial_words(true);

for sample in samples.chunks(100) {
    recognizer.accept_waveform(sample);
    println!("{:#?}", recognizer.partial_result());
}

println!("{:#?}", recognizer.final_result().multiple().unwrap());

Setup

Compilation

The Vosk-API libraries have to be discoverable by the rust linker. Download the zip file containing the dynamic libraries for your platform here. For iOS development you have to use static libraries. Get the static libraries from the vosk-api team.

Using dynamic libraries

Do either of the following:

Read the full README
  • Recommended: Create a build script and provide cargo with the path to the libraries
  • Use the RUSTFLAGS environment variable to provide the path to the variables like so: RUSTFLAGS=-L/path/to/the/libraries with cargo:rustc-link-search or cargo:rustc-link-lib.
  • Make the vosk library accessible system or user-wide:
    • Windows: Move the libraries to a directory in your PATH environment variable.
    • Linux: Move them to /usr/local/lib, /usr/lib or set the LIBRARY_PATH environment variable to the directory containing the libraries.

Although the approaches are equivalent, using a build script is more convenient because it does not require the developer to remember a terminal command or change anything outside the project scope.

Using static libraries (macOS-only, targeting iOS)
  • Extract the correct non-fat file (also called thin file) from the static fat file (libvosk.a) for each architecture you would like to support.
  • Mark your crate type as staticlib.
  • Create a build script and provide cargo with the path to the libraries with cargo:rustc-link-search= and cargo:rustc-link-lib=static=.
Troubleshooting

In real-world scenarios, one will use Rust to cross compile a library (e.g. Android and iOS). Therefore, we need both cdylib as well as the staticlib as crate-type. If you compile as usual with cargo build (e.g.: cargo build --target aarch64-apple-ios --release) it will not work, because cargo tries to build the dylib as well. Fortunately, since rust 1.64, there is a new option for rustc in the stable channel. Because of this, the following will work: cargo rustc --crate-type staticlib --lib --target aarch64-apple-ios --release

Execution

Executables compiled with a dynamic lib must have access to the vosk library at runtime. Executables compiled with a statically compiled library do not.

Using dynamic libraries

Do either of the following:

  • Recommended: Copy the libraries to the root of the executable (target/<cargo profile name> by default). It is recommended that you use a tool such as cargo-make to automate moving the libraries from another, more practical, directory to the destination during build.
  • Make the vosk library accessible system or user-wide:
    • Windows: Move the libraries to a directory in your PATH environment variable.
    • Linux: Move them to /usr/local/lib, /usr/lib or set the LD_LIBRARY_PATH environment variable to the directory containing the libraries. Note: LD_LIBRARY_PATH is not the same as LIBRARY_PATH mentioned in the compilation step.
Using static libraries (iOS-only)
  • Add the compiled .a library (or libraries if you would like to support more than one architecture) to your iOS project
  • Set Enable Bitcode to no for your target
  • Add the Accelerate Framework from the iOS SDK to your project
  • Depending on your library and use case, you have to write some C -> Objective-C -> Swift glue code.
Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
Required
  • Binds native code: vosk-sys
Python bindings
No Python binding crate found
License
MIT

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

vosk-rs beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
vosk-rs This page Listed Dormant

Safe wrapper around the Vosk API Speech Recognition Toolkit

7,299 downloads over 30 days 4 182 0.3.1 GPU support unknown Binds native code: vosk-sys MIT
sherpa-onnx Featured

Safe Rust wrapper for sherpa-onnx speech recognition toolkit

259,599 downloads over 30 days 28 15,834 2.0.1 GPU support unknown Binds native code: sherpa-onnx, sherpa-onnx-sys Apache-2.0
msedge-tts Listed

This library is a wrapper of MSEdge Read aloud function API. You can use it to synthesize text to speech with many voices MS provided.

5,349 downloads over 30 days 3 27 0.4.1 GPU support unknown No native code found Apache-2.0 OR MIT
silero Listed

Production-oriented Rust wrapper for the Silero VAD ONNX model.

1,888 downloads over 30 days 3 6 0.7.0 CUDA, ROCm Binds native code: ort-sys (feature coreml) Apache-2.0 OR MIT
aspeak App Listed Dormant

A simple text-to-speech client for Azure TTS API.

Python bindings

488 binary downloads per release Not applicable 496 6.1.0 GPU support unknown No native code found MIT

Rust implementation for the CohereLabs/cohere-transcribe-03-2026 speech-to-text model. Includes a CLI and an OpenAI-compatible API server.

0 downloads over 30 days 0 101 0.1.1 CUDA Binds native code: torch-sys (feature tch-backend). Build uses a native toolchain: cmake Apache-2.0
voxr New

Audio and speech on boostr: compressed-audio decode, resampling, DSP and grapheme to phoneme, with speech synthesis (Kokoro, VITS), voice cloning (VoxCPM2), transcription with word timings (Whisper), voice activity (Silero) and audio-text scoring (CLAP), on CPU or CUDA.

642 downloads over 30 days 2 2 0.9.1 CUDA No native code found Apache-2.0
Why ListedNo archive, New or Featured rule places it, so it is Listed.

What it lacks for Featured

  • It has 1 active dependents and 1 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 182 stars, 16 forks and 8 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
  • The project is dormant and not finished. Dormancy rule

What else the check found

  • The last activity is on 28 Jul 2025, 469 days ago. That reaches the 365 days the rules expect, so the project is dormant. Dormancy rule

Not measured: Latest release fails cargo check.

Exact rules: Listed, Featured library. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 0.3.1 base 300, capped at 4 releases = 200, raised to the 365-day floor: E = 365 days
  • dormancy: last activity 2025-07-28, 469 days ago, E = 365: dormant
  • featured: not featured: active_users 1 < 11 and new_adopters 1 < 9 and repository route stars 182 (needs 4539), forks 16 (needs 434), contributors 8 (needs 79); dormant and not stable
  • listed: listed: no archive, new or featured rule applies
Crates2 crates

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption1 active dependents, 1 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents1crates.io database dumpYes
New dependents (365 days)1crates.io database dumpYes
Peak active dependents2.5crates.io database dumpYes
Active dependents as a share of the peak0.9875crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 15 months ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2025-07-28GitHub repositoryYes
Latest release2024-10-27crates.io database dumpYes
First release2022-06-29crates.io database dumpYes
Latest version0.3.1crates.io database dumpYes
Days the oldest outside issue waits for a reply0GitHub repositoryYes
Maintainer replies over 365 days1GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution4 releases, 7,299 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases4crates.io database dumpYes
Downloads over 30 days7299crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository182 stars, 16 forks, 8 contributors, 136 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars182GitHub repositoryYes — one part of the repository route
GitHub forks16GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account8GitHub contributorsYes — one part of the repository route
Commits on the default branch136GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseMITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: vosk-syscrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly4crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.