Documentation ¶
Index ¶
- Variables
- func NewASROptionsWhisperCpp() common.ASROptions
- func NewASRWhisperCpp(model *common.ASRModel) common.ASR
- func NewASRWhisperCppWithDefaultModel() common.ASR
- type ASROptionsWhisperCpp
- func (c ASROptionsWhisperCpp) GetAudioFile() string
- func (c ASROptionsWhisperCpp) GetRequest() interface{}
- func (c ASROptionsWhisperCpp) GetTimeout() time.Duration
- func (c ASROptionsWhisperCpp) WithAudioFile(audioFile string) common.ASROptions
- func (c ASROptionsWhisperCpp) WithLanguage(language string) common.ASROptions
- func (c ASROptionsWhisperCpp) WithModel(model string) common.ASROptions
- func (c ASROptionsWhisperCpp) WithOutputFormat(format string) common.ASROptions
- func (c ASROptionsWhisperCpp) WithPrompt(prompt string) common.ASROptions
- func (c ASROptionsWhisperCpp) WithTemperature(temperature float32) common.ASROptions
- func (c ASROptionsWhisperCpp) WithTimeout(timeout time.Duration) common.ASROptions
- type ASRWhisperCpp
- func (c *ASRWhisperCpp) Transcribe(audioFile string) (common.ASRResult, error)
- func (c *ASRWhisperCpp) TranscribeWithContext(ctx context.Context, audioFile string) (common.ASRResult, error)
- func (c *ASRWhisperCpp) TranscribeWithOptions(ctx context.Context, opts common.ASROptions) (common.ASRResult, error)
- func (c *ASRWhisperCpp) Translate(audioFile string) (common.ASRResult, error)
- func (c *ASRWhisperCpp) TranslateWithContext(ctx context.Context, audioFile string) (common.ASRResult, error)
- func (c *ASRWhisperCpp) TranslateWithOptions(ctx context.Context, opts common.ASROptions) (common.ASRResult, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Base = &common.ASRModel{ Name: "base", ContextSize: 26214400, ContextUnit: schema.ContextUnitByte, UsageCost: &schema.CostObject{Price: 0, Unit: schema.CostUnitMinute, UnitSize: 1}, } Tiny = &common.ASRModel{ Name: "tiny", ContextSize: 26214400, ContextUnit: schema.ContextUnitByte, UsageCost: &schema.CostObject{Price: 0, Unit: schema.CostUnitMinute, UnitSize: 1}, } Small = &common.ASRModel{ Name: "small", ContextSize: 26214400, ContextUnit: schema.ContextUnitByte, UsageCost: &schema.CostObject{Price: 0, Unit: schema.CostUnitMinute, UnitSize: 1}, } Medium = &common.ASRModel{ Name: "medium", ContextSize: 26214400, ContextUnit: schema.ContextUnitByte, UsageCost: &schema.CostObject{Price: 0, Unit: schema.CostUnitMinute, UnitSize: 1}, } Large = &common.ASRModel{ Name: "large", ContextSize: 26214400, ContextUnit: schema.ContextUnitByte, UsageCost: &schema.CostObject{Price: 0, Unit: schema.CostUnitMinute, UnitSize: 1}, } )
Functions ¶
func NewASROptionsWhisperCpp ¶
func NewASROptionsWhisperCpp() common.ASROptions
Types ¶
type ASROptionsWhisperCpp ¶
type ASROptionsWhisperCpp struct {
// contains filtered or unexported fields
}
func (ASROptionsWhisperCpp) GetAudioFile ¶
func (c ASROptionsWhisperCpp) GetAudioFile() string
func (ASROptionsWhisperCpp) GetRequest ¶
func (c ASROptionsWhisperCpp) GetRequest() interface{}
func (ASROptionsWhisperCpp) GetTimeout ¶
func (c ASROptionsWhisperCpp) GetTimeout() time.Duration
func (ASROptionsWhisperCpp) WithAudioFile ¶
func (c ASROptionsWhisperCpp) WithAudioFile(audioFile string) common.ASROptions
func (ASROptionsWhisperCpp) WithLanguage ¶
func (c ASROptionsWhisperCpp) WithLanguage(language string) common.ASROptions
func (ASROptionsWhisperCpp) WithModel ¶
func (c ASROptionsWhisperCpp) WithModel(model string) common.ASROptions
func (ASROptionsWhisperCpp) WithOutputFormat ¶
func (c ASROptionsWhisperCpp) WithOutputFormat(format string) common.ASROptions
func (ASROptionsWhisperCpp) WithPrompt ¶
func (c ASROptionsWhisperCpp) WithPrompt(prompt string) common.ASROptions
func (ASROptionsWhisperCpp) WithTemperature ¶
func (c ASROptionsWhisperCpp) WithTemperature(temperature float32) common.ASROptions
func (ASROptionsWhisperCpp) WithTimeout ¶
func (c ASROptionsWhisperCpp) WithTimeout(timeout time.Duration) common.ASROptions
type ASRWhisperCpp ¶
type ASRWhisperCpp struct {
// contains filtered or unexported fields
}
func (*ASRWhisperCpp) Transcribe ¶
func (c *ASRWhisperCpp) Transcribe(audioFile string) (common.ASRResult, error)
func (*ASRWhisperCpp) TranscribeWithContext ¶
func (*ASRWhisperCpp) TranscribeWithOptions ¶
func (c *ASRWhisperCpp) TranscribeWithOptions(ctx context.Context, opts common.ASROptions) (common.ASRResult, error)
func (*ASRWhisperCpp) Translate ¶
func (c *ASRWhisperCpp) Translate(audioFile string) (common.ASRResult, error)
func (*ASRWhisperCpp) TranslateWithContext ¶
func (*ASRWhisperCpp) TranslateWithOptions ¶
func (c *ASRWhisperCpp) TranslateWithOptions(ctx context.Context, opts common.ASROptions) (common.ASRResult, error)
Click to show internal directories.
Click to hide internal directories.