Documentation
¶
Overview ¶
Package soniox provides Soniox real-time streaming speech-to-text over its WebSocket API. Soniox streams tokens, each marked final or provisional, and signals end-of-turn with a special "<end>" token; this service surfaces provisional text as interims and the finalized utterance with EndOfTurn set.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSTT ¶
func NewSTT(cfg Config) *stt.StreamService
NewSTT builds a Soniox streaming STT service.
Types ¶
type Config ¶
type Config struct {
// APIKey is the Soniox API key, sent in the config handshake. Required.
APIKey string `validate:"required"`
// URL overrides the real-time endpoint; empty uses the hosted endpoint.
URL string
// Model is the transcription model; empty uses a current default.
Model string
// Language hints the spoken language; the zero value lets Soniox auto-detect.
Language language.Language
// SampleRate is the input audio sample rate; 0 uses the transport's rate.
SampleRate int
// EnableEndpointDetection emits an end-of-turn marker on detected silence;
// nil defaults to true.
EnableEndpointDetection *bool
}
Config configures the Soniox STT service.
Click to show internal directories.
Click to hide internal directories.