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, r io.Reader, req *schema.TranscribeRequest) (*schema.Transcription, error)
- func (m *Manager) Translate(ctx context.Context, r io.Reader, req *schema.TranslateRequest) (*schema.Transcription, error)
- type 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, r io.Reader, req *schema.TranscribeRequest) (*schema.Transcription, error)
Transcribe performs a transcription request in the language of the speech
type Opt ¶
type Opt func(*opts) error
func OptClientOpts ¶
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 ¶
OptClientTimeout is a convenience wrapper to set the HTTP client timeout for ElevenLabs and OpenAI requests.
func OptElevenLabsKey ¶
OptElevenLabsKey sets the ElevenLabs API key
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 |