Documentation
¶
Overview ¶
Package audioio converts a local audio (or video) file into the 16 kHz mono 16-bit PCM WAV that whisper.cpp expects, using ffmpeg. It drops any video stream (-vn) so a video source only ships its audio downstream, and NEVER fetches a remote URL — only local files. Mirrors internal/videoio.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToWav16k ¶
ConvertToWav16k transcodes audioPath to a 16 kHz mono PCM WAV in a fresh temp dir and returns the wav path plus a cleanup func that removes the temp dir. ffmpegPath is the ffmpeg executable ("" => "ffmpeg"). The caller MUST defer cleanup() (it is also safe to call twice). A missing input or an ffmpeg failure returns an error and leaves nothing behind.
Types ¶
This section is empty.