Documentation
¶
Overview ¶
Package dictation implements the POST /v1/dictation/transcribe handler. It is a thin adapter around the Framework's STT router: accept audio bytes and metadata, normalize to canonical PCM via internal/server/audio, and delegate to the router. The handler has no knowledge of which provider serves the request; that's the router's job.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements the dictation HTTP surface.
func New ¶
New constructs a Handler. The router must be non-nil; a zero maxBytes defaults to 25 MB to match the documented API contract.
type Options ¶
type Options struct {
Router Transcriber
MaxUploadMB int // request body ceiling; 0 disables the limit (discouraged)
}
Options configures a single handler instance.
type Transcriber ¶
type Transcriber interface {
Route(ctx context.Context, audio []byte, audioDurationSecs float64, opts stt.TranscribeOpts) (*stt.Result, error)
}
Transcriber is the minimal surface the handler needs from an STT router. The production implementation is `internal/router.Router`; tests provide a fake.