Install and load
Run these commands in a Haybarn SQL session. The extension is available from the community repository.
INSTALL whisper FROM community;
LOAD whisper FROM community;
Using upstream DuckDB? Follow the maintainerβs installation instructions.
Usage example
Transcribe an audio file
-- Transcribe an audio file
D SELECT whisper_transcribe('audio.wav', 'tiny.en');
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β whisper_transcribe(...) β
β varchar β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Hello, this is a test of the whisper extension. β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Get detailed transcription segments with timestamps
D SELECT * FROM whisper_transcribe_segments('audio.wav', 'tiny.en');
ββββββββββββββ¬βββββββββββββ¬βββββββββββ¬βββββββββββββββββββββ¬βββββββββββββ¬βββββββββββ
β segment_id β start_time β end_time β text β confidence β language β
β int32 β double β double β varchar β double β varchar β
ββββββββββββββΌβββββββββββββΌβββββββββββΌβββββββββββββββββββββΌβββββββββββββΌβββββββββββ€
β 0 β 0.00 β 2.50 β Hello, this is a β 0.95 β en β
β 1 β 2.50 β 4.00 β test of whisper. β 0.92 β en β
ββββββββββββββ΄βββββββββββββ΄βββββββββββ΄βββββββββββββββββββββ΄βββββββββββββ΄βββββββββββ
-- List available models
D SELECT model_name, size_mb, is_downloaded FROM whisper_list_models() LIMIT 3;
ββββββββββββββ¬ββββββββββ¬ββββββββββββββββ
β model_name β size_mb β is_downloaded β
β varchar β int64 β boolean β
ββββββββββββββΌββββββββββΌββββββββββββββββ€
β tiny β 75 β false β
β tiny.en β 75 β true β
β base β 142 β false β
ββββββββββββββ΄ββββββββββ΄ββββββββββββββββ
Provided by tobilg. Not yet verified on Haybarn 2.0.0.
Sample data & setupAbout this extension
A DuckDB extension for speech-to-text transcription using whisper.cpp, the C/C++ port of OpenAI's Whisper model.
Transcribe audio files directly from SQL queries in DuckDB, making it easy to process and analyze audio data alongside your other data.
Project overview from the community descriptor.
Documentation and resources
Project and build details
- Repository
- tobilg/duckdb-whisper
- License
- MIT
- Maintainers
- tobilg
- Written in
- C++
- Build source
ea3e28cec896- Build definition
- Community descriptor