stt

package
v0.0.0-...-32dd017 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service provides speech-to-text transcription using whisper-cli subprocess.

func New

func New(ctx context.Context, l logger.Logger, dataDir string, modelPath string) (*Service, error)

New creates a new STT service. If modelPath is empty, the model is stored in {dataDir}/models/ggml-small.bin and downloaded automatically on first start.

func (*Service) Transcribe

func (s *Service) Transcribe(ctx context.Context, oggData []byte) (string, error)

Transcribe converts OGG/Opus audio bytes to text. Requires ffmpeg and whisper-cli to be available in PATH.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL