Documentation ¶
Index ¶
- Constants
- type LogFn
- type Opt
- type Whisper
- func (w *Whisper) Close() error
- func (w *Whisper) DeleteModelById(id string) error
- func (w *Whisper) DownloadModel(ctx context.Context, path string, fn func(curBytes, totalBytes uint64)) (*schema.Model, error)
- func (w *Whisper) GetModelById(id string) *schema.Model
- func (w *Whisper) ListModels() []*schema.Model
- func (w *Whisper) MarshalJSON() ([]byte, error)
- func (w *Whisper) String() string
- func (w *Whisper) WithModel(model *schema.Model, fn func(task *task.Context) error) error
Constants ¶
View Source
const ( // Sample Rate SampleRate = whisper.SampleRate )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Whisper ¶
type Whisper struct {
// contains filtered or unexported fields
}
Whisper represents a whisper service for running transcription and translation
func New ¶
Create a new whisper service with the path to the models directory and optional parameters
func (*Whisper) DeleteModelById ¶
Delete a model by its id
func (*Whisper) DownloadModel ¶
func (w *Whisper) DownloadModel(ctx context.Context, path string, fn func(curBytes, totalBytes uint64)) (*schema.Model, error)
Download a model by path, where the directory is the root of the model within the models directory. The model is returned immediately if it already exists in the store
func (*Whisper) GetModelById ¶
Get a model by its Id, returns nil if the model does not exist
func (*Whisper) ListModels ¶
Return all models in the models directory
func (*Whisper) MarshalJSON ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
pkg
|
|
segmenter
segmenter package provides a segmenter for audio files and streams
|
segmenter package provides a segmenter for audio files and streams |
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 |
sys
|
|
Click to show internal directories.
Click to hide internal directories.