stt

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package stt turns voice messages into text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToWav

func ToWav(ctx context.Context, ffmpeg, in, out string) error

ToWav converts any audio ffmpeg reads to 16 kHz mono WAV.

Types

type Factory added in v0.6.0

type Factory func(Options) (Transcriber, error)

Factory builds a Transcriber from its options.

type Options added in v0.6.0

type Options interface {
	Decode(v any) error
}

Options decodes a provider's config keys.

type Transcriber

type Transcriber interface {
	Transcribe(ctx context.Context, path string) (string, error)
}

Transcriber turns an audio file into text.

func NewCommand added in v0.6.0

func NewCommand(o Options) (Transcriber, error)

NewCommand runs any program that prints a transcript.

func NewHTTP added in v0.6.0

func NewHTTP(o Options) (Transcriber, error)

NewHTTP posts audio to a /audio/transcriptions endpoint, the de facto standard API served by many hosted and self-hosted speech services.

func NewWhisperCpp added in v0.6.0

func NewWhisperCpp(o Options) (Transcriber, error)

NewWhisperCpp transcribes locally with whisper.cpp.

Jump to

Keyboard shortcuts

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