Documentation
¶
Index ¶
- type Engine
- type PythonEngine
- func (e *PythonEngine) Close() error
- func (e *PythonEngine) ModelName() string
- func (e *PythonEngine) Transcribe(ctx context.Context, req api.OpenAIAudioTranscriptionRequest) (*api.OpenAIAudioTranscriptionResponse, error)
- func (e *PythonEngine) TranscribeStream(ctx context.Context, req api.OpenAIAudioTranscriptionRequest, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface {
Transcribe(ctx context.Context, req api.OpenAIAudioTranscriptionRequest) (*api.OpenAIAudioTranscriptionResponse, error)
TranscribeStream(ctx context.Context, req api.OpenAIAudioTranscriptionRequest, onChunk func(api.OpenAIAudioTranscriptionResponse) error) error
Close() error
ModelName() string
}
Engine is the interface for local automatic speech recognition backends.
type PythonEngine ¶
type PythonEngine struct {
// contains filtered or unexported fields
}
func NewPythonEngine ¶
func NewPythonEngine(ctx context.Context, modelName, modelDir string, runtimeManager *imagegen.RuntimeManager) (*PythonEngine, error)
func (*PythonEngine) Close ¶
func (e *PythonEngine) Close() error
func (*PythonEngine) ModelName ¶
func (e *PythonEngine) ModelName() string
func (*PythonEngine) Transcribe ¶
func (e *PythonEngine) Transcribe(ctx context.Context, req api.OpenAIAudioTranscriptionRequest) (*api.OpenAIAudioTranscriptionResponse, error)
func (*PythonEngine) TranscribeStream ¶
func (e *PythonEngine) TranscribeStream(ctx context.Context, req api.OpenAIAudioTranscriptionRequest, onChunk func(api.OpenAIAudioTranscriptionResponse) error) error
Click to show internal directories.
Click to hide internal directories.