transcribe-audio
Transcribe Audio
Local audio transcription using whisper-cpp — a C++ port of OpenAI's Whisper.
Quick Start
# Transcribe with distil-large-v3 (fast, high quality)
nix run nixpkgs#whisper-cpp -- -m models/ggml-distil-large-v3.bin -f audio.mp3
Model
| Model | Size | Speed | Quality |
|---|---|---|---|
ggml-distil-large-v3.bin |
1.5 GB | ⚡ Fast | Best |
Download the Model
curl -L https://huggingface.co/distil-whisper/distil-large-v3-ggml/resolve/main/ggml-distil-large-v3.bin -o ggml-distil-large-v3.bin
Common Options
| Option | Description |
|---|---|
-m MODEL |
Model path |
-f FILE |
Input audio file |
-t N |
Threads (default: 4) |
-l LANG |
Language (en, auto, etc.) |
-otxt |
Output to .txt file |
-osrt |
Output to .srt subtitle file |
-ovtt |
Output to .vtt file |
-oj |
Output to JSON |
-of PATH |
Output file path (without extension) |
-nt |
No timestamps in output |
-np |
No prints (results only) |
--print-confidence |
Show confidence scores |
Examples
Transcribe with Timestamps (Default)
nix run nixpkgs#whisper-cpp -- -m ggml-distil-large-v3.bin -f recording.mp3
Save to Text File
nix run nixpkgs#whisper-cpp -- -m ggml-distil-large-v3.bin -f recording.mp3 -otxt -of transcript
Generate Subtitles
# First extract audio from video
ffmpeg -i video.mp4 -vn -acodec libmp3lame -ab 128k video.mp3
# Then transcribe
nix run nixpkgs#whisper-cpp -- -m ggml-distil-large-v3.bin -f video.mp3 -osrt -of captions
JSON Output with Confidence
nix run nixpkgs#whisper-cpp -- -m ggml-distil-large-v3.bin -f audio.wav -oj -of result --print-confidence
Auto-Detect Language
nix run nixpkgs#whisper-cpp -- -m ggml-distil-large-v3.bin -f audio.mp3 -l auto
Process Multiple Files
nix run nixpkgs#whisper-cpp -- -m ggml-distil-large-v3.bin -f file1.mp3 file2.mp3 file3.mp3
Offset and Duration
# Start at 30s, process 60 seconds
nix run nixpkgs#whisper-cpp -- -m ggml-distil-large-v3.bin -f audio.mp3 -ot 30000 -d 60000
Supported Formats
Audio: flac, mp3, ogg, wav
Video: Extract audio first:
ffmpeg -i video.mp4 -vn -acodec libmp3lame -ab 128k audio.mp3
GPU Acceleration
For GPU support, use whisper-cpp-vulkan:
nix run nixpkgs#whisper-cpp-vulkan -- -m ggml-distil-large-v3.bin -f audio.mp3
More from knoopx/pi
podman
Manages containers, builds images, configures pods and networks with Podman. Use when running containers, creating Containerfiles, grouping services in pods, or managing container resources.
122jujutsu
Manages version control with Jujutsu (jj), including rebasing, conflict resolution, and Git interop. Use when tracking changes, navigating history, squashing/splitting commits, or pushing to Git remotes.
117nix-flakes
Creates reproducible builds, manages flake inputs, defines devShells, and builds packages with flake.nix. Use when initializing Nix projects, locking dependencies, or running nix build/develop commands.
54scraping
Fetches web pages, parses HTML with CSS selectors, calls REST APIs, and scrapes dynamic content. Use when extracting data from websites, querying JSON APIs, or automating browser interactions.
48jscpd
Finds duplicate code blocks and analyzes duplication metrics across files. Use when identifying copy-pasted code, measuring technical debt, or preparing for refactoring.
45yt-dlp
Downloads videos from YouTube and other sites using yt-dlp. Use when downloading videos, extracting metadata, or batch downloading multiple files.
42