dictation

package
v0.40.7 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package dictation provides an embeddable strict Dictation runtime.

Dictation is the most boundary-strict of the three SpeechKit modes: STT turns speech into text and the pipeline stops there. No LLM rewriting, no codewords, no tool invocation. Host apps integrate this when they want a transcript surface they can route into their own editor, command dispatcher, or downstream processor.

Use NewRuntime to construct an instance; pass a recorder, a worker, and the speechkit.RuntimePolicy from the host config.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingRecorder    = errors.New("speechkit dictation: recorder is required")
	ErrMissingTranscriber = errors.New("speechkit dictation: transcriber is required")
	ErrAlreadyRecording   = errors.New("speechkit dictation: already recording")
	ErrNotRecording       = errors.New("speechkit dictation: not recording")
	ErrAudioTooShort      = errors.New("speechkit dictation: audio too short")
)

Functions

This section is empty.

Types

type Options

type Options struct {
	Recorder    speechkit.AudioRecorder
	Transcriber speechkit.Transcriber
	Output      speechkit.TranscriptOutput
	Store       speechkit.Persistence
	Policy      speechkit.RuntimePolicy
	Profiles    []speechkit.ProviderProfile
	Language    string
	Target      any
	MinPCMBytes int
}

type Runtime

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

Runtime is an embeddable Dictation-only service. It keeps the mode boundary strict: audio in, final text out, no tool calls or LLM rewriting.

func NewRuntime

func NewRuntime(opts Options) (*Runtime, error)

func (*Runtime) Start

func (r *Runtime) Start(ctx context.Context) error

func (*Runtime) Stop

Jump to

Keyboard shortcuts

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