Documentation
¶
Overview ¶
bucky lets you write Go applications that directly integrate whisper.cpp (https://github.com/ggml-org/whisper.cpp) for fully local automatic speech recognition (ASR) using hardware acceleration.
- Run any Whisper model on Linux, macOS, or Windows.
- Use any available hardware acceleration such as CUDA (https://en.wikipedia.org/wiki/CUDA), Metal (https://en.wikipedia.org/wiki/Metal_(API)), or Vulkan (https://en.wikipedia.org/wiki/Vulkan) for maximum performance.
- bucky uses the purego (https://github.com/ebitengine/purego) and ffi (https://github.com/JupiterRider/ffi) packages so CGo is not needed.
- Works with the newest whisper.cpp releases so you can use the latest features and model support.
bucky is the speech-to-text sibling of yzma (https://github.com/hybridgroup/yzma), which provides the same kind of FFI bindings for llama.cpp.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cmd implements the bucky CLI subcommands (install, system, model, whisper, info) wired into urfave/cli.
|
Package cmd implements the bucky CLI subcommands (install, system, model, whisper, info) wired into urfave/cli. |
|
examples
|
|
|
hello
command
hello is the smallest possible bucky example: load a tiny whisper model, decode an audio file (WAV / MP3 / FLAC), and print the resulting text.
|
hello is the smallest possible bucky example: load a tiny whisper model, decode an audio file (WAV / MP3 / FLAC), and print the resulting text. |
|
segments
command
segments transcribes an audio clip and prints each segment with its start and end timestamps.
|
segments transcribes an audio clip and prints each segment with its start and end timestamps. |
|
streaming
command
streaming demonstrates pseudo-streaming transcription by sliding a fixed-size window across the input audio.
|
streaming demonstrates pseudo-streaming transcription by sliding a fixed-size window across the input audio. |
|
transcribe
command
transcribe is a fuller bucky example: it accepts CLI flags to set the language, initial prompt, temperature, and beam size when transcribing an audio file with whisper.
|
transcribe is a fuller bucky example: it accepts CLI flags to set the language, initial prompt, temperature, and beam size when transcribing an audio file with whisper. |
|
translate
command
translate transcribes an audio clip and translates the result to English.
|
translate transcribes an audio clip and translates the result to English. |
|
words
command
words transcribes an audio clip with token-level timestamps enabled and prints "[t0 -> t1] word" for every non-special token.
|
words transcribes an audio clip with token-level timestamps enabled and prints "[t0 -> t1] word" for every non-special token. |
|
pkg
|
|
|
audio
Package audio decodes common audio formats into the 16 kHz mono float32 PCM that whisper.cpp expects.
|
Package audio decodes common audio formats into the 16 kHz mono float32 PCM that whisper.cpp expects. |
|
download
Package download provides utilities for downloading the whisper.cpp shared libraries and Whisper model files.
|
Package download provides utilities for downloading the whisper.cpp shared libraries and Whisper model files. |
|
loader
Package loader provides functions for loading the shared whisper.cpp libraries.
|
Package loader provides functions for loading the shared whisper.cpp libraries. |
|
utils
Package utils provides small string conversion helpers used by the bucky FFI bindings.
|
Package utils provides small string conversion helpers used by the bucky FFI bindings. |
|
whisper
Package whisper provides Go FFI bindings to whisper.cpp using purego and jupiterrider/ffi.
|
Package whisper provides Go FFI bindings to whisper.cpp using purego and jupiterrider/ffi. |
Click to show internal directories.
Click to hide internal directories.