whisperutil

package
v0.0.0-...-54efdb4 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: ISC Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultModelName = "ggml-base.bin"
	CacheDirName     = "whisper.cpp"
)

Variables

This section is empty.

Functions

func GetModelPath

func GetModelPath(opts ...Option) (string, error)

GetModelPath returns the path to the model file.

Types

type ModelPathOptions

type ModelPathOptions struct {
	ModelName string
	AutoFetch bool
}

ModelPathOptions is used to configure the model path.

type Option

type Option func(*ModelPathOptions)

Option is a function that configures a ModelPathOptions.

func WithAutoFetch

func WithAutoFetch() Option

WithAutoFetch enables auto-fetching of the model if it is not found.

func WithModelName

func WithModelName(modelName string) Option

WithModelName sets the model name to use.

Jump to

Keyboard shortcuts

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