whispercpp

package
v0.0.0-...-66bbac4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

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

func NewASRWhisperCpp

func NewASRWhisperCpp(model *common.ASRModel) common.ASR

func NewASRWhisperCppWithDefaultModel

func NewASRWhisperCppWithDefaultModel() common.ASR

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 (c *ASRWhisperCpp) TranscribeWithContext(ctx context.Context, audioFile string) (common.ASRResult, error)

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 (c *ASRWhisperCpp) TranslateWithContext(ctx context.Context, audioFile string) (common.ASRResult, error)

func (*ASRWhisperCpp) TranslateWithOptions

func (c *ASRWhisperCpp) TranslateWithOptions(ctx context.Context, opts common.ASROptions) (common.ASRResult, error)

Jump to

Keyboard shortcuts

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