soniox

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: BSD-2-Clause Imports: 11 Imported by: 0

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.

func (Config) Validate

func (c Config) Validate() error

Validate reports whether the configuration is usable.

Jump to

Keyboard shortcuts

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