Documentation ¶
Index ¶
- Variables
- func NewASROpenAI(token string, model *common.ASRModel) common.ASR
- func NewASROpenAIWithDefaultModel(token string) common.ASR
- func NewASROptionsOpenAI() common.ASROptions
- type ASROpenAI
- func (c *ASROpenAI) Transcribe(audioFile string) (common.ASRResult, error)
- func (c *ASROpenAI) TranscribeWithContext(ctx context.Context, audioFile string) (common.ASRResult, error)
- func (c *ASROpenAI) TranscribeWithOptions(ctx context.Context, opts common.ASROptions) (common.ASRResult, error)
- func (c *ASROpenAI) Translate(audioFile string) (common.ASRResult, error)
- func (c *ASROpenAI) TranslateWithContext(ctx context.Context, audioFile string) (common.ASRResult, error)
- func (c *ASROpenAI) TranslateWithOptions(ctx context.Context, opts common.ASROptions) (common.ASRResult, error)
- type ASROptionsOpenAI
- func (c ASROptionsOpenAI) GetAudioFile() string
- func (c ASROptionsOpenAI) GetRequest() interface{}
- func (c ASROptionsOpenAI) GetTimeout() time.Duration
- func (c ASROptionsOpenAI) WithAudioFile(audioFile string) common.ASROptions
- func (c ASROptionsOpenAI) WithLanguage(language string) common.ASROptions
- func (c ASROptionsOpenAI) WithModel(model string) common.ASROptions
- func (c ASROptionsOpenAI) WithOutputFormat(format string) common.ASROptions
- func (c ASROptionsOpenAI) WithPrompt(prompt string) common.ASROptions
- func (c ASROptionsOpenAI) WithTemperature(temperature float32) common.ASROptions
- func (c ASROptionsOpenAI) WithTimeout(timeout time.Duration) common.ASROptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Whisper1 = &common.ASRModel{ Name: openai.Whisper1, ContextSize: 26214400, ContextUnit: schema.ContextUnitByte, UsageCost: &schema.CostObject{Price: 0.006, Unit: schema.CostUnitMinute, UnitSize: 1}, } )
Functions ¶
func NewASROptionsOpenAI ¶
func NewASROptionsOpenAI() common.ASROptions
Types ¶
type ASROpenAI ¶
type ASROpenAI struct {
// contains filtered or unexported fields
}
func (*ASROpenAI) Transcribe ¶
func (*ASROpenAI) TranscribeWithContext ¶
func (*ASROpenAI) TranscribeWithOptions ¶
func (*ASROpenAI) TranslateWithContext ¶
func (*ASROpenAI) TranslateWithOptions ¶
type ASROptionsOpenAI ¶
type ASROptionsOpenAI struct {
// contains filtered or unexported fields
}
func (ASROptionsOpenAI) GetAudioFile ¶
func (c ASROptionsOpenAI) GetAudioFile() string
func (ASROptionsOpenAI) GetRequest ¶
func (c ASROptionsOpenAI) GetRequest() interface{}
func (ASROptionsOpenAI) GetTimeout ¶
func (c ASROptionsOpenAI) GetTimeout() time.Duration
func (ASROptionsOpenAI) WithAudioFile ¶
func (c ASROptionsOpenAI) WithAudioFile(audioFile string) common.ASROptions
func (ASROptionsOpenAI) WithLanguage ¶
func (c ASROptionsOpenAI) WithLanguage(language string) common.ASROptions
func (ASROptionsOpenAI) WithModel ¶
func (c ASROptionsOpenAI) WithModel(model string) common.ASROptions
func (ASROptionsOpenAI) WithOutputFormat ¶
func (c ASROptionsOpenAI) WithOutputFormat(format string) common.ASROptions
func (ASROptionsOpenAI) WithPrompt ¶
func (c ASROptionsOpenAI) WithPrompt(prompt string) common.ASROptions
func (ASROptionsOpenAI) WithTemperature ¶
func (c ASROptionsOpenAI) WithTemperature(temperature float32) common.ASROptions
func (ASROptionsOpenAI) WithTimeout ¶
func (c ASROptionsOpenAI) WithTimeout(timeout time.Duration) common.ASROptions
Click to show internal directories.
Click to hide internal directories.