Documentation
¶
Index ¶
- Constants
- type Context
- type Model
- type ModelPool
- type Transcription
- type TranscriptionSegment
- type Whisper
- func (w *Whisper) Close() error
- func (w *Whisper) DeleteModelById(id string) error
- func (w *Whisper) DownloadModel(ctx context.Context, name, dest string) (*Model, error)
- func (w *Whisper) GetModelById(id string) *Model
- func (w *Whisper) ListModels() []*Model
- func (w *Whisper) Transcribe(ctx *Context, samples []float32) (*Transcription, error)
- func (w *Whisper) WithModelContext(model *Model, fn func(ctx *Context) error) error
Constants ¶
View Source
const (
SampleRate = whisper.SampleRate
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
func NewContextWithModel ¶
func (*Context) SetLanguage ¶
func (*Context) SetTemperature ¶ added in v0.0.3
func (*Context) SetTranslate ¶
type ModelPool ¶
type ModelPool struct {
// contains filtered or unexported fields
}
func NewModelPool ¶
type Transcription ¶
type Transcription struct {
Task string `json:"task,omitempty"`
Language string `json:"language,omitempty"`
Duration float64 `json:"duration,omitempty"`
Text string `json:"text"`
Segments []TranscriptionSegment `json:"segments,omitempty"`
}
type TranscriptionSegment ¶
type Whisper ¶
type Whisper struct {
// contains filtered or unexported fields
}
func (*Whisper) DeleteModelById ¶
func (*Whisper) DownloadModel ¶
func (*Whisper) GetModelById ¶
func (*Whisper) ListModels ¶
func (*Whisper) Transcribe ¶
func (w *Whisper) Transcribe(ctx *Context, samples []float32) (*Transcription, error)
Transcribe decoded samples with a context
Click to show internal directories.
Click to hide internal directories.