transcribe-rs
Library Listed
A simple library to help you transcribe audio
- Downloads
- 95,741
- Dependents
- 6
- Stars
- 279
- Forks
- 89
- Contributors
- 14
- Commits
- 94
- Latest release
- 0.3.12 ·
About
Multi-engine speech-to-text library for Rust. Supports Parakeet, Canary, Cohere, Moonshine, SenseVoice, GigaAM, Whisper, Whisperfile, and OpenAI.
Breaking Changes in 0.3.0
Version 0.3.0 changes the SpeechModel trait. If you need the old API, pin to version = "=0.2.9".
transcribe()andtranscribe_file()now take&TranscribeOptionsinstead ofOption<&str>for languageSpeechModelrequiresSend, enablingBox<dyn SpeechModel + Send>across threadsTranscribeOptionsincludes atranslatefield for Whisper/Whisperfile translation supportWhisperEngine::capabilities()now returns actual model language support (English-only vs multilingual) instead of always reporting 99 languages
Note: 0.3.0 is a large migration. We believe correctness is preserved for all engines, but expect potential issues as this stabilizes. Please report any problems on GitHub.
Installation
[dependencies]
transcribe-rs = { version = "0.3", features = ["onnx"] }
No features are enabled by default. Pick the engines you need:
Read the full README
| Feature | Engines |
|---|---|
onnx | Parakeet, Canary, Cohere, Moonshine, SenseVoice, GigaAM (via ONNX Runtime) |
whisper-cpp | Whisper (local, GGML via whisper.cpp with Metal/Vulkan/CUDA) |
whisperfile | Whisperfile (local server wrapper) |
openai | OpenAI API (remote, async) |
all | Everything above |
GPU accelerator features for whisper.cpp:
| Feature | Backend |
|---|---|
whisper-metal | Apple Metal (macOS) |
whisper-vulkan | Vulkan (Windows/Linux) |
whisper-cuda | NVIDIA CUDA (requires CUDA Toolkit 12.0+) |
GPU accelerator features for ORT engines:
| Feature | Backend |
|---|---|
ort-cuda | NVIDIA CUDA |
ort-rocm | AMD ROCm |
ort-directml | Microsoft DirectML (Windows) |
ort-coreml | Apple CoreML (macOS/iOS) |
ort-webgpu | WebGPU via Dawn |
Quick Start
use transcribe_rs::onnx::parakeet::{ParakeetModel, ParakeetParams, TimestampGranularity};
use transcribe_rs::onnx::Quantization;
use std::path::PathBuf;
let mut model = ParakeetModel::load(
&PathBuf::from("models/parakeet-tdt-0.6b-v3-int8"),
&Quantization::Int8,
)?;
let samples = transcribe_rs::audio::read_wav_samples(&PathBuf::from("audio.wav"))?;
let result = model.transcribe_with(
&samples,
&ParakeetParams {
timestamp_granularity: Some(TimestampGranularity::Segment),
..Default::default()
},
)?;
println!("{}", result.text);
All local engines implement the SpeechModel trait. Remote engines (OpenAI) implement RemoteTranscriptionEngine separately because they are async and file-based.
Hardware Acceleration
By default, engines use CPU. To enable GPU acceleration, enable the appropriate feature and set the accelerator preference before loading any models:
use transcribe_rs::{set_ort_accelerator, OrtAccelerator};
// Use CUDA for all ORT engines (SenseVoice, GigaAM, Parakeet, Moonshine)
set_ort_accelerator(OrtAccelerator::Cuda);
// Or auto-detect the best available GPU
set_ort_accelerator(OrtAccelerator::Auto);
For whisper.cpp, GPU backend (Metal, Vulkan, CUDA) is selected at compile time via feature flags. You can control whether GPU is used at runtime:
use transcribe_rs::{set_whisper_accelerator, WhisperAccelerator};
set_whisper_accelerator(WhisperAccelerator::CpuOnly); // force CPU
DirectML note: DirectML requires special ORT session settings (parallel_execution(false), memory_pattern(false)) that would hurt performance on other backends. Because of this, Auto mode does not include DirectML — you must explicitly select it with OrtAccelerator::DirectMl.
Query which ORT accelerators are compiled in with OrtAccelerator::available().
Usage by Engine
Canary
use transcribe_rs::onnx::canary::{CanaryModel, CanaryParams};
use transcribe_rs::onnx::Quantization;
use std::path::PathBuf;
let mut model = CanaryModel::load(
&PathBuf::from("models/canary-1b-v2"),
&Quantization::Int8,
)?;
let samples = transcribe_rs::audio::read_wav_samples(&PathBuf::from("audio.wav"))?;
let result = model.transcribe_with(
&samples,
&CanaryParams {
language: Some("en".to_string()),
..Default::default()
},
)?;
Canary supports translation via target_language:
let result = model.transcribe_with(
&samples,
&CanaryParams {
language: Some("de".to_string()),
target_language: Some("en".to_string()),
..Default::default()
},
)?;
Model variant (Flash vs V2) is auto-detected from vocabulary size. Flash models support en/de/es/fr; V2 supports 25 languages.
Features:
- PnC (punctuation and capitalization) — enabled by default. When on, the model adds proper punctuation and capitalization. Set
use_pnc: falsefor raw output. - ITN (inverse text normalization) — enabled by default. Converts spoken numbers to written form (e.g. "one hundred twenty three" becomes "123"). Set
use_itn: falseto disable. Only supported on V2 models; silently ignored on Flash. - Translation — set
target_languageto translate between supported languages.
Cohere
use transcribe_rs::onnx::cohere::{CohereModel, CohereParams};
use transcribe_rs::onnx::Quantization;
use std::path::PathBuf;
let mut model = CohereModel::load(
&PathBuf::from("models/cohere-int4"),
&Quantization::Int4,
)?;
let samples = transcribe_rs::audio::read_wav_samples(&PathBuf::from("audio.wav"))?;
let result = model.transcribe_with(
&samples,
&CohereParams {
language: Some("en".to_string()),
..Default::default()
},
)?;
Available in int4 and int8 quantizations.
SenseVoice
use transcribe_rs::onnx::sense_voice::{SenseVoiceModel, SenseVoiceParams};
use transcribe_rs::onnx::Quantization;
use std::path::PathBuf;
let mut model = SenseVoiceModel::load(
&PathBuf::from("models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17"),
&Quantization::Int8,
)?;
let samples = transcribe_rs::audio::read_wav_samples(&PathBuf::from("audio.wav"))?;
let result = model.transcribe_with(
&samples,
&SenseVoiceParams {
language: Some("en".to_string()),
..Default::default()
},
)?;
Moonshine
use transcribe_rs::onnx::moonshine::{MoonshineModel, MoonshineVariant};
use transcribe_rs::onnx::Quantization;
use transcribe_rs::SpeechModel;
use std::path::PathBuf;
let mut model = MoonshineModel::load(
&PathBuf::from("models/moonshine-base"),
MoonshineVariant::Base,
&Quantization::default(),
)?;
let result = model.transcribe_file(&PathBuf::from("audio.wav"), &transcribe_rs::TranscribeOptions::default())?;
Streaming variant:
use transcribe_rs::onnx::moonshine::StreamingModel;
use transcribe_rs::onnx::Quantization;
use transcribe_rs::SpeechModel;
use std::path::PathBuf;
let mut model = StreamingModel::load(
&PathBuf::from("models/moonshine-streaming/moonshine-tiny-streaming-en"),
4, // threads
&Quantization::default(),
)?;
let result = model.transcribe_file(&PathBuf::from("audio.wav"), &transcribe_rs::TranscribeOptions::default())?;
GigaAM
use transcribe_rs::onnx::gigaam::GigaAMModel;
use transcribe_rs::onnx::Quantization;
use transcribe_rs::SpeechModel;
use std::path::PathBuf;
let mut model = GigaAMModel::load(
&PathBuf::from("models/giga-am-v3"),
&Quantization::default(),
)?;
let result = model.transcribe_file(&PathBuf::from("audio.wav"), &transcribe_rs::TranscribeOptions::default())?;
Whisper (whisper.cpp)
use transcribe_rs::whisper_cpp::{WhisperEngine, WhisperInferenceParams};
use std::path::PathBuf;
let mut engine = WhisperEngine::load(&PathBuf::from("models/whisper-medium-q4_1.bin"))?;
let samples = transcribe_rs::audio::read_wav_samples(&PathBuf::from("audio.wav"))?;
let result = engine.transcribe_with(
&samples,
&WhisperInferenceParams {
initial_prompt: Some("Context prompt here.".to_string()),
..Default::default()
},
)?;
Whisperfile
use transcribe_rs::whisperfile::{
WhisperfileEngine, WhisperfileInferenceParams, WhisperfileLoadParams,
};
use std::path::PathBuf;
let mut engine = WhisperfileEngine::load_with_params(
&PathBuf::from("models/whisperfile-0.9.3"),
&PathBuf::from("models/ggml-small.bin"),
WhisperfileLoadParams {
port: 8080,
startup_timeout_secs: 60,
..Default::default()
},
)?;
let samples = transcribe_rs::audio::read_wav_samples(&PathBuf::from("audio.wav"))?;
let result = engine.transcribe_with(
&samples,
&WhisperfileInferenceParams {
language: Some("en".to_string()),
..Default::default()
},
)?;
// Server shuts down automatically when engine is dropped.
OpenAI (Remote)
use transcribe_rs::remote::openai::{self, OpenAIModel, OpenAIRequestParams};
use transcribe_rs::{remote, RemoteTranscriptionEngine};
use std::path::PathBuf;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let engine = openai::default_engine();
let result = engine
.transcribe_file(
&PathBuf::from("audio.wav"),
OpenAIRequestParams::builder()
.model(OpenAIModel::Gpt4oMiniTranscribe)
.timestamp_granularity(remote::openai::OpenAITimestampGranularity::Segment)
.build()?,
)
.await?;
println!("{}", result.text);
Ok(())
}
Models
All audio input must be 16 kHz, mono, 16-bit PCM WAV.
Model Downloads
| Engine | Download |
|---|---|
| Parakeet (int8) | blob.handy.computer / HuggingFace |
| Canary 180M Flash | HuggingFace |
| Canary 1B Flash | HuggingFace |
| Canary 1B v2 | HuggingFace |
| Cohere (int4) | HuggingFace |
| Cohere (int8) | HuggingFace |
| SenseVoice (int8) | blob.handy.computer / sherpa-onnx |
| Moonshine | blob.handy.computer (base), blob.handy.computer (tiny streaming en), blob.handy.computer (small streaming en), blob.handy.computer (medium streaming en) |
| GigaAM | HuggingFace |
| Whisper (GGML) | HuggingFace |
| Whisperfile binary | GitHub |
Directory Layouts
Parakeet (directory):
models/parakeet-tdt-0.6b-v3-int8/
├── encoder-model.int8.onnx
├── decoder_joint-model.int8.onnx
├── nemo128.onnx
└── vocab.txt
Canary (directory):
models/canary-1b-v2/
├── encoder-model.int8.onnx
├── decoder-model.int8.onnx
├── nemo128.onnx
└── vocab.txt
Cohere (directory):
models/cohere-int4/
├── cohere-encoder.int4.onnx
├── cohere-encoder.int4.onnx.data
├── cohere-decoder.int4.onnx
├── cohere-decoder.int4.onnx.data
└── tokens.txt
SenseVoice (directory):
models/sense-voice/
├── model.int8.onnx
└── tokens.txt
Moonshine (directory):
models/moonshine-base/
├── encoder_model.onnx
├── decoder_model_merged.onnx
└── tokenizer.json
Moonshine Streaming (directory):
models/moonshine-streaming/moonshine-tiny-streaming-en/
├── encoder.onnx
├── decoder.onnx
├── streaming_config.json
└── tokenizer.json
GigaAM (directory):
models/giga-am-v3/
├── model.onnx (or model.int8.onnx)
└── vocab.txt
Whisper: single file (e.g. whisper-medium-q4_1.bin).
Moonshine Variants
| Variant | Language |
|---|---|
| Tiny | English |
| TinyAr | Arabic |
| TinyZh | Chinese |
| TinyJa | Japanese |
| TinyKo | Korean |
| TinyUk | Ukrainian |
| TinyVi | Vietnamese |
| Base | English |
| BaseEs | Spanish |
Examples and Tests
Each engine has an example in examples/. Run with the appropriate feature flag:
cargo run --example parakeet --features onnx
cargo run --example canary --features onnx
cargo run --example cohere --features onnx
cargo run --example sense_voice --features onnx
cargo run --example moonshine --features onnx
cargo run --example moonshine_streaming --features onnx
cargo run --example gigaam --features onnx
cargo run --example whisper --features whisper-cpp
cargo run --example whisperfile --features whisperfile
cargo run --example openai --features openai
Tests are also feature-gated. Models must be present locally; tests skip gracefully if not found.
cargo test --features onnx
cargo test --features whisper-cpp
cargo test --features whisperfile
cargo test --all-features
Whisperfile tests look for the binary at models/whisperfile-0.9.3 (override with WHISPERFILE_BIN) and model at models/ggml-small.bin (override with WHISPERFILE_MODEL). GigaAM tests require samples/russian.wav.
Development aliases from .cargo/config.toml:
cargo check-all # cargo check --all-features
cargo build-all # cargo build --all-features
cargo test-all # cargo test --all-features
Performance
Parakeet int8 benchmarks:
| Platform | Speed |
|---|---|
| MBP M4 Max | ~30x real-time |
| Zen 3 (5700X) | ~20x real-time |
| Skylake (i5-6500) | ~5x real-time |
| Jetson Nano CPU | ~5x real-time |
Acknowledgments
- istupakov for the ONNX Parakeet, Canary, and GigaAM exports
- NVIDIA for Parakeet and Canary
- whisper.cpp
- jart / Mozilla AI for llamafile and Whisperfile
- UsefulSensors for Moonshine
- FunASR / sherpa-onnx for SenseVoice
- SberDevices for GigaAM
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- Optional
- Binds native code: ort-sys (feature onnx), whisper-rs-sys (feature whisper-cpp)
- 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.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
A simple library to help you transcribe audio |
95,741 downloads over 30 days | 6 | 279 | 0.3.12 | GPU support unknown | Binds native code: ort-sys (feature onnx), whisper-rs-sys (feature whisper-cpp) | MIT |
|
nnnoiseless Featured
Audio denoising, derived from Xiph's RNNoise library |
172,829 downloads over 30 days | 27 | 370 | 0.5.2 | GPU support unknown | Binds native code: hdf5-sys (feature train) | BSD-3-Clause |
|
sonora Listed
Automatic Gain Control 2 (AGC2) with RNN VAD for WebRTC Audio Processing |
551,810 downloads over 30 days | 3 | 99 | 0.3.0 | GPU support unknown | No native code found | BSD-3-Clause |
|
mel_spec Listed
Mel spectrograms aligned to the results from the whisper.cpp, pytorch and librosa reference implementations and suited to streaming audio. |
26,437 downloads over 30 days | 6 | 91 | 0.5.0 | CUDA, WebGPU | Binds native code: ort-sys (feature ort-tensor). Build uses a native toolchain: cc | MIT |
|
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 |
|
transcribe-cpp New
Rust bindings for transcribe.cpp, a C/C++ speech-to-text library built on ggml |
50,251 downloads over 30 days | 3 | 2,149 | 0.4.1 | CUDA, Metal, ROCm, Vulkan | Binds native code: transcribe, transcribe-cpp-sys, transcribe_cpp. Build uses a native toolchain: cmake | MIT |
|
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 4 active dependents and 4 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 279 stars, 89 forks and 14 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
What else the check found
- The last activity is on 2 Oct 2026, 38 days ago. The rules expect an update within 900 days. Dormancy rule
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.12 base 450, doubled for 95741 downloads per month: E = 900 daysdormancy: last activity 2026-10-02, 38 days ago, E = 900: activefeatured: not featured: active_users 4 < 11 and new_adopters 4 < 9 and repository route stars 279 (needs 4539), forks 89 (needs 434), contributors 14 (needs 79)listed: listed: no archive, new or featured rule applies
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
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption4 active dependents, 4 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 4 | crates.io database dump | Yes | |
| New dependents (365 days) | 4 | crates.io database dump | Yes | |
| Peak active dependents | 4 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 38 days ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-10-02 | GitHub repository | Yes | |
| Latest release | 2026-10-02 | crates.io database dump | Yes | |
| First release | 2025-09-10 | crates.io database dump | Yes | |
| Latest version | 0.3.12 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 385 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 99 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution26 releases, 95,741 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 26 | crates.io database dump | Yes | |
| Downloads over 30 days | 95741 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository279 stars, 89 forks, 14 contributors, 94 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 279 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 89 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 14 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 94 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: ort-sys (feature onnx), whisper-rs-sys (feature whisper-cpp) | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 6 | crates.io database dump | No |
Corrections and review history
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.