Versions in this module Expand all Collapse all v0 v0.11.3 Dec 1, 2026 Changes in this version + const DialTimeout + const PartialSuffix + const PinnedVersion + const RecordName + const ResponseHeaderTimeout + const StallTimeout + const TLSHandshakeTimeout + var ErrBadArchive = errors.New("archive does not hold libspeech") + var ErrHTTPStatus = errors.New("unexpected HTTP status") + var ErrIntegrity = errors.New("integrity check failed") + var ErrInvalidFile = errors.New("invalid model file description") + var ErrInvalidVersion = errors.New("invalid speech.cpp version") + var ErrNoChecksum = errors.New("no SHA-256 for the archive") + var ErrNotInstallDir = errors.New("destination is not a libspeech install directory") + var ErrNotInstalled = errors.New("libspeech is not installed") + var ErrStalled = errors.New("download stalled") + var ErrUnsafeArchive = errors.New("unsafe archive") + var ErrUnsupportedTarget = errors.New("no published libspeech archive for this target") + func ArchiveName(version string, t Target) (string, error) + func DefaultUserAgent() string + func LibraryName(goos string) (string, error) + func Model(ctx context.Context, name, weightType, dir string) (string, error) + func ModelPath(dir, name, weightType string) (string, error) + func VerifyFile(path string, f catalog.File) error + type Backend string + const BackendCPU + const BackendMetal + const BackendVulkan + type Client struct + HTTPClient *http.Client + Progress ProgressFunc + UserAgent string + func (c *Client) File(ctx context.Context, f catalog.File, dir string) (string, error) + func (c *Client) Library(ctx context.Context, t Target, version, dir string) (Install, error) + func (c *Client) Model(ctx context.Context, name, weightType, dir string) (string, error) + type Install struct + Archive string + ArchiveSHA256 string + Dir string + Files map[string]string + Installed time.Time + Library string + Links map[string]string + Target Target + Version string + func Installed(dir string) (Install, error) + func Library(ctx context.Context, t Target, version, dir string) (Install, error) + func (i Install) LibraryPath() string + func (i Install) Verify() error + type ProgressFunc func(done, total int64) + type Target struct + Arch string + Backend Backend + OS string + func HostTarget(backend Backend) Target + func Targets() []Target + func (t Target) Platform() (string, error) + func (t Target) String() string