transcribe-rs

Multi-engine speech-to-text library for Rust with local and remote backends.

Library
Cargo
v0.3.11
257stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
46/100Fair
Development Activity44
Maintenance4
Community60
Maturity36
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
77/100Good
Architecture84
Code Quality74
Innovation80
Learning Curve70

transcribe-rs is a speech-to-text library for Rust that puts many transcription engines behind one common interface. Through a shared SpeechModel trait, you can transcribe audio with Whisper, Whisperfile, Parakeet, Canary, Cohere, Moonshine, SenseVoice, GigaAM, or the OpenAI API, choosing engines a la carte with Cargo feature flags so your build only pulls in what you use.

It is designed for both fully local and remote workloads: ONNX Runtime powers several engines, whisper.cpp provides local GGML inference, and GPU acceleration is available across Metal, Vulkan, CUDA, ROCm, DirectML, CoreML, and WebGPU. A uniform TranscribeOptions type controls language, translation, and timestamp behavior regardless of which engine is loaded.

What You Get

  • A unified SpeechModel trait covering Whisper, Parakeet, Canary, Cohere, Moonshine, SenseVoice, GigaAM, Whisperfile, and OpenAI
  • Feature-gated engines so builds only include the backends you select
  • Local inference via ONNX Runtime and whisper.cpp plus a remote OpenAI path
  • Broad GPU acceleration across Metal, Vulkan, CUDA, ROCm, DirectML, CoreML, and WebGPU

Common Use Cases

  • Adding offline voice transcription to a desktop or CLI Rust app
  • Building a dictation or captioning pipeline that can fall back between local and cloud engines
  • Batch-transcribing audio files with word- or segment-level timestamps

Under The Hood

Architecture - The core is a SpeechModel trait (src/transcriber, lib.rs) that every engine implements, exposing transcribe/transcribe_file over a &TranscribeOptions; engines live in cfg-gated modules (src/onnx for Parakeet/Canary/Moonshine/etc., src/whisper_cpp, src/whisperfile.rs, src/remote for OpenAI). Supporting subsystems include audio decoding (src/audio.rs, src/decode), voice-activity detection (src/vad), feature extraction (src/features), and hardware acceleration hooks (src/accel.rs), so preprocessing is shared while inference is engine-specific. As of 0.3.0 the trait requires Send, enabling Box<dyn SpeechModel + Send> across threads.

Tech Stack - Rust with heavy optional dependencies selected by Cargo features: ONNX Runtime (ort) for the neural engines, whisper.cpp bindings for local GGML inference, and async HTTP for the OpenAI remote path. GPU backends are additional features layering Metal, Vulkan, CUDA, ROCm, DirectML, CoreML, and WebGPU onto the base engines.

Code Quality - The crate carries a dedicated error module (src/error.rs), a stated commitment to preserving correctness across engines during the 0.3.0 migration, and clear capability reporting per model (English-only vs multilingual). It is still stabilizing, and the README candidly warns that the large 0.3.0 refactor may surface issues.

API Design - Getting started is a few lines: enable a feature, construct a model such as ParakeetModel, and call transcribe with TranscribeOptions. The uniform options type and shared trait mean switching engines rarely changes call sites, though the wide feature-flag matrix means users must understand which flags and GPU backends to enable for their target.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search