stt

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package stt provides speech-to-text transcription via Whisper (local) or Groq API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transcribe

func Transcribe(audioPath string, cfg Config) (string, error)

Transcribe reads audio from audioPath and returns the transcribed text. audioPath must be a file on disk; the caller is responsible for any tmp cleanup.

Types

type Config

type Config struct {
	// Provider: "whisper" (local) or "groq" (API). Defaults to "whisper".
	Provider Provider

	// WhisperModel: "base", "small", "medium", "large". Defaults to "base".
	WhisperModel string

	// GroqAPIKey is required when Provider == "groq".
	// Falls back to GROQ_API_KEY env var.
	GroqAPIKey string
}

Config holds speech-to-text configuration.

type Provider

type Provider string

Provider selects the STT backend.

const (
	ProviderWhisper Provider = "whisper"
	ProviderGroq    Provider = "groq"
)

Jump to

Keyboard shortcuts

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