config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// defaults
	ModelSizeDefault                            = ModelSizeBase
	NumThreadsDefault                           = 2
	TranscribeAPIDefault                        = TranscribeAPIWhisperCPP
	OutputFormatDefault                         = OutputFormatVTT
	LiveCaptionsModelSizeDefault                = ModelSizeTiny
	LiveCaptionsNumTranscribersDefault          = 1
	LiveCaptionsNumThreadsPerTranscriberDefault = 2
	LiveCaptionsLanguageDefault                 = "en"
)
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

	// live captions config
	LiveCaptionsOn                       bool
	LiveCaptionsModelSize                ModelSize
	LiveCaptionsNumTranscribers          int
	LiveCaptionsNumThreadsPerTranscriber int
	LiveCaptionsLanguage                 string
}

func FromEnv added in v0.1.1

func FromEnv() (CallTranscriberConfig, error)

func (*CallTranscriberConfig) FromMap

func (CallTranscriberConfig) IsValid

func (cfg CallTranscriberConfig) IsValid() error

func (CallTranscriberConfig) IsValidURL added in v0.2.2

func (cfg CallTranscriberConfig) IsValidURL() 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