whispercpp

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinDir

func BinDir() string

BinDir returns the directory where llmconfig manages whisper.cpp binaries.

func Extract

func Extract(archivePath string) error

Extract installs whisper.cpp from a local zip file.

func FindBinary

func FindBinary() (string, error)

FindBinary returns the path to the whisper-cli binary, preferring the managed bin dir.

func FindServer

func FindServer() (string, error)

FindServer returns the path to the whisper-server binary, preferring the managed bin dir. It deliberately does NOT fall back to whisper-cli: `up` launches this path with server-only flags, and starting the CLI with those flags just fails confusingly.

func Install

func Install(asset *GithubAsset, onProgress func(downloaded, total int64)) error

Install downloads and extracts a release asset into BinDir(). onProgress is called with (downloaded, total) bytes.

func Version

func Version(binPath string) (string, error)

Version runs whisper-cli and tries to extract the version string. whisper-cli does not support --version; we parse whatever output is available.

Types

type GithubAsset

type GithubAsset struct {
	Name               string `json:"name"`
	BrowserDownloadURL string `json:"browser_download_url"`
	Size               int64  `json:"size"`
}

func PickAsset

func PickAsset(rel *GithubRelease, backend string) (*GithubAsset, error)

PickAsset selects the best release asset for the current OS/arch/backend. backend: "cuda", "cpu", "" (auto-detect) Note: Linux and macOS do not have pre-built CLI binaries — returns an error.

type GithubRelease

type GithubRelease struct {
	TagName string        `json:"tag_name"`
	Assets  []GithubAsset `json:"assets"`
}

func LatestRelease

func LatestRelease() (*GithubRelease, error)

LatestRelease fetches the latest whisper.cpp release metadata from GitHub.

func ReleaseByTag

func ReleaseByTag(tag string) (*GithubRelease, error)

ReleaseByTag fetches release metadata for a specific whisper.cpp tag from GitHub.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL