pkg

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func New

func New(modelsPath string, whisperOpts []whisper.Opt, opt ...Opt) (*Manager, error)

New creates a new manager with a whisper client and optionally elevenlabs and openai clients if API keys are provided via Opts

func (*Manager) Close

func (m *Manager) Close() error

Close closes the manager and all clients

func (*Manager) DeleteModel

func (m *Manager) DeleteModel(ctx context.Context, modelID string) error

DeleteModel deletes a whisper model by id

func (*Manager) DownloadModel

func (m *Manager) DownloadModel(ctx context.Context, path string, fn func(cur, total uint64)) (*schema.Model, error)

DownloadModel downloads a whisper model by path

func (*Manager) GetModel

func (m *Manager) GetModel(ctx context.Context, modelID string) (*schema.Model, error)

GetModel retrieves a model by ID from all available sources

func (*Manager) ListModels

func (m *Manager) ListModels(ctx context.Context) []*schema.Model

ListModels returns all available models from whisper, openai, and elevenlabs

func (*Manager) Transcribe

Transcribe performs a transcription request in the language of the speech

func (*Manager) Translate

Translate performs a transcription request and returns the result in English

type Opt

type Opt func(*opts) error

func OptClientOpts

func OptClientOpts(clientOpts ...goclient.ClientOpt) Opt

OptClientOpts appends client options applied to HTTP-based providers (ElevenLabs and OpenAI). This is useful for setting timeouts, tracing, headers, and other transport-level behaviors shared across providers.

func OptClientTimeout

func OptClientTimeout(d time.Duration) Opt

OptClientTimeout is a convenience wrapper to set the HTTP client timeout for ElevenLabs and OpenAI requests.

func OptElevenLabsKey

func OptElevenLabsKey(key string) Opt

OptElevenLabsKey sets the ElevenLabs API key

func OptOpenAIKey

func OptOpenAIKey(key string) Opt

OptOpenAIKey sets the OpenAI API key

func OptTracer

func OptTracer(tracer trace.Tracer) Opt

OptTracer sets the OpenTelemetry tracer for distributed tracing of transcription, translation, and model operations across all providers.

Directories

Path Synopsis
https://elevenlabs.io/docs/overview
https://elevenlabs.io/docs/overview
Package httpclient provides a typed Go client for consuming the go-whisper REST API.
Package httpclient provides a typed Go client for consuming the go-whisper REST API.
store
store implements a model store which allows downloading models from a remote server
store implements a model store which allows downloading models from a remote server

Jump to

Keyboard shortcuts

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