resources

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyExitOnHelp added in v0.2.0

func ApplyExitOnHelp(c *cobra.Command, exitCode int)

func DownloadFile

func DownloadFile(url string, filepath string) error

func GetModel

func GetModel(modelType string) (string, error)

func GetWhisperDll

func GetWhisperDll(version string) (string, error)

func HandleDefaultModel added in v0.2.0

func HandleDefaultModel(modelType string) (string, error)

HandleDefaultModel checks if the default model exists or prompts the user to download it

func HandleWhisperDll added in v0.2.0

func HandleWhisperDll(version string) (string, error)

HandleWhisperDll checks if Whisper.dll exists or prompts the user to download it

func IsFileExists

func IsFileExists(filename string) bool

func PromptUser added in v0.2.0

func PromptUser(question string) bool

PromptUser prompts the user with a question and returns true if they agree

Types

type Arguments added in v0.2.0

type Arguments struct {
	Language  string
	ModelPath string
	Port      int
}

Arguments holds the parsed CLI arguments

type LanguageMap added in v0.2.0

type LanguageMap map[string]string

LanguageMap represents the mapping of languages to their hex codes

type ParsedArguments added in v0.2.0

type ParsedArguments struct {
	Language  int32
	ModelPath string
	Port      int
}

ParsedArguments holds the processed arguments

func ParseFlags added in v0.2.0

func ParseFlags() (*ParsedArguments, error)

Jump to

Keyboard shortcuts

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