Documentation
¶
Index ¶
- type Manager
- func (m *Manager) Close() error
- func (m *Manager) DeleteModel(ctx context.Context, modelID string) error
- func (m *Manager) DownloadModel(ctx context.Context, path string, fn func(cur, total uint64)) (*schema.Model, error)
- func (m *Manager) GetModel(ctx context.Context, modelID string) (*schema.Model, error)
- func (m *Manager) ListModels(ctx context.Context) []*schema.Model
- func (m *Manager) Transcribe(ctx context.Context, w schema.SegmentWriter, r io.Reader, ...) (*schema.Transcription, error)
- func (m *Manager) Translate(ctx context.Context, w schema.SegmentWriter, r io.Reader, ...) (*schema.Transcription, error)
- type Opt
- func OptElevenLabsKey(key string) Opt
- func OptOpenAIKey(key string) Opt
- func WithClientOpts(clientOpts ...goclient.ClientOpt) Opt
- func WithClientTimeout(d time.Duration) Opt
- func WithSegmenterOpt(segmenterOpts ...segmenter.Opt) Opt
- func WithTracer(tracer trace.Tracer) Opt
- func WithWhisperOpt(whisperOpts ...whisper.Opt) Opt
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 ¶
New creates a new manager with a whisper client and optionally elevenlabs and openai clients if API keys are provided via Opts
func (*Manager) DeleteModel ¶
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) ListModels ¶
ListModels returns all available models from whisper, openai, and elevenlabs
func (*Manager) Transcribe ¶
func (m *Manager) Transcribe(ctx context.Context, w schema.SegmentWriter, r io.Reader, req *schema.TranscribeRequest) (*schema.Transcription, error)
Transcribe performs a transcription request in the language of the speech
func (*Manager) Translate ¶
func (m *Manager) Translate(ctx context.Context, w schema.SegmentWriter, r io.Reader, req *schema.TranslateRequest) (*schema.Transcription, error)
Translate performs a transcription request and returns the result in English
type Opt ¶
type Opt func(*opts) error
func OptElevenLabsKey ¶
OptElevenLabsKey sets the ElevenLabs API key
func WithClientOpts ¶ added in v0.0.36
WithClientOpts 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 WithClientTimeout ¶ added in v0.0.36
WithClientTimeout is a convenience wrapper to set the HTTP client timeout for ElevenLabs and OpenAI requests.
func WithSegmenterOpt ¶ added in v0.0.36
WithSegmenterOpt appends segmenter options applied to the audio segmenter used during transcription and translation.
func WithTracer ¶ added in v0.0.36
WithTracer sets the OpenTelemetry tracer for distributed tracing of transcription, translation, and model operations across all providers.
func WithWhisperOpt ¶ added in v0.0.36
WithWhisperOpt appends whisper options applied to the whisper manager used during transcription and translation.
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 |