Skip to content

Getting Started

= edited this page Feb 10, 2026 · 1 revision

Getting Started

Install the library

[dependencies]
transcriber = "0.1"

You also need ffmpeg on your system for audio decoding:

# Debian/Ubuntu
apt install ffmpeg

# macOS
brew install ffmpeg

# Arch
pacman -S ffmpeg

If you want to transcribe URLs (YouTube etc.), install yt-dlp too:

pip install yt-dlp

Your first transcription

#[tokio::main]
async fn main() -> Result<(), transcriber::Error> {
    // From a URL — downloads, decodes, transcribes
    let transcript = transcriber::transcribe("https://youtube.com/watch?v=...").await?;
    println!("{}", transcript.text());

    // From a local file
    let transcript = transcriber::transcribe_file("recording.mp3").await?;
    println!("{}", transcript.to_srt());

    Ok(())
}

The first run will download the whisper model (~2.9 GB for large-v3) from HuggingFace. It's cached in ~/.cache/transcriber/models/ so subsequent runs are fast.

Picking a model

If you're not sure, start with the default (large-v3) — it's the most accurate. If it's too slow for your hardware, drop down to small or base:

use transcriber::{TranscribeOptions, Model};

let opts = TranscribeOptions::new()
    .model(Model::Small);

let transcript = transcriber::transcribe_with_options(url, &opts).await?;

See the Models page for a full comparison.

Setting the language

By default, whisper auto-detects the language. If you know what it is, setting it explicitly is faster and more reliable:

let opts = TranscribeOptions::new()
    .language("de")?;   // German

You can use short codes (de, en, fr, ja) or full names (german, english, french, japanese).

Clone this wiki locally