config

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// defaults
	ModelSizeDefault     = ModelSizeBase
	TranscribeAPIDefault = TranscribeAPIWhisperCPP
	OutputFormatDefault  = OutputFormatVTT
)
View Source
const (
	ModelSizeTiny   ModelSize = "tiny"
	ModelSizeBase             = "base"
	ModelSizeSmall            = "small"
	ModelSizeMedium           = "medium"
	ModelSizeLarge            = "large"
)
View Source
const (
	TranscribeAPIWhisperCPP    = "whisper.cpp"
	TranscribeAPIOpenAIWhisper = "openai/whisper"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CallTranscriberConfig

type CallTranscriberConfig struct {
	// input config
	SiteURL         string
	CallID          string
	PostID          string
	AuthToken       string
	TranscriptionID string
	NumThreads      int

	// output config
	TranscribeAPI TranscribeAPI
	ModelSize     ModelSize
	OutputFormat  OutputFormat
	OutputOptions OutputOptions
}

func FromEnv added in v0.1.1

func FromEnv() (CallTranscriberConfig, error)

func (*CallTranscriberConfig) FromMap

func (CallTranscriberConfig) IsValid

func (cfg CallTranscriberConfig) IsValid() error

func (*CallTranscriberConfig) SetDefaults

func (cfg *CallTranscriberConfig) SetDefaults()

func (CallTranscriberConfig) ToEnv

func (cfg CallTranscriberConfig) ToEnv() []string

func (CallTranscriberConfig) ToMap

func (cfg CallTranscriberConfig) ToMap() map[string]any

type ModelSize

type ModelSize string

func (ModelSize) IsValid

func (p ModelSize) IsValid() bool

type OutputFormat

type OutputFormat string
const (
	OutputFormatVTT OutputFormat = "vtt"
)

type OutputOptions added in v0.1.1

type OutputOptions struct {
	WebVTT transcribe.WebVTTOptions
	Text   transcribe.TextOptions
}

type TranscribeAPI

type TranscribeAPI string

func (TranscribeAPI) IsValid

func (a TranscribeAPI) IsValid() bool

Jump to

Keyboard shortcuts

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