soniox

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginTitle   = "rtp-agent.plugins.soniox"
	PluginVersion = "v0.4.2"
	PluginPackage = "rtp-agent.plugins.soniox"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type STT added in v0.4.2

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

func NewSTT added in v0.4.2

func NewSTT(apiKey string, opts ...STTOption) *STT

func NewSonioxSTT deprecated

func NewSonioxSTT(apiKey string, opts ...STTOption) *STT

Deprecated: use NewSTT.

func (*STT) Capabilities added in v0.4.2

func (s *STT) Capabilities() stt.STTCapabilities

func (*STT) InputSampleRate added in v0.4.2

func (s *STT) InputSampleRate() uint32

func (*STT) Label added in v0.4.2

func (s *STT) Label() string

func (*STT) Model added in v0.4.2

func (s *STT) Model() string

func (*STT) Provider added in v0.4.2

func (s *STT) Provider() string

func (*STT) Recognize added in v0.4.2

func (s *STT) Recognize(ctx context.Context, frames []*model.AudioFrame, language string) (*stt.SpeechEvent, error)

func (*STT) Stream added in v0.4.2

func (s *STT) Stream(ctx context.Context, language string) (stt.RecognizeStream, error)

type STTOption added in v0.4.2

type STTOption func(*STT)

func WithSonioxBaseURL added in v0.0.15

func WithSonioxBaseURL(baseURL string) STTOption

func WithSonioxClientReferenceID added in v0.0.15

func WithSonioxClientReferenceID(clientReferenceID string) STTOption

func WithSonioxContextObject added in v0.0.15

func WithSonioxContextObject(context SonioxContextObject) STTOption

func WithSonioxContextText added in v0.0.15

func WithSonioxContextText(context string) STTOption

func WithSonioxLanguageHints added in v0.0.15

func WithSonioxLanguageHints(languageHints []string) STTOption

func WithSonioxLanguageHintsStrict added in v0.0.15

func WithSonioxLanguageHintsStrict(strict bool) STTOption

func WithSonioxLanguageIdentification added in v0.0.15

func WithSonioxLanguageIdentification(enabled bool) STTOption

func WithSonioxMaxEndpointDelayMS added in v0.0.15

func WithSonioxMaxEndpointDelayMS(ms int) STTOption

func WithSonioxModel added in v0.0.15

func WithSonioxModel(model string) STTOption

func WithSonioxNumChannels added in v0.0.15

func WithSonioxNumChannels(numChannels int) STTOption

func WithSonioxOneWayTranslation added in v0.0.15

func WithSonioxOneWayTranslation(targetLanguage string) STTOption

func WithSonioxSampleRate added in v0.0.15

func WithSonioxSampleRate(sampleRate int) STTOption

func WithSonioxSpeakerDiarization added in v0.0.15

func WithSonioxSpeakerDiarization(enabled bool) STTOption

func WithSonioxTwoWayTranslation added in v0.0.15

func WithSonioxTwoWayTranslation(languageA string, languageB string) STTOption

type SonioxContextGeneralItem added in v0.0.15

type SonioxContextGeneralItem struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type SonioxContextObject added in v0.0.15

type SonioxContextObject struct {
	General          []SonioxContextGeneralItem     `json:"general,omitempty"`
	Text             string                         `json:"text,omitempty"`
	Terms            []string                       `json:"terms,omitempty"`
	TranslationTerms []SonioxContextTranslationTerm `json:"translation_terms,omitempty"`
}

type SonioxContextTranslationTerm added in v0.0.15

type SonioxContextTranslationTerm struct {
	Source string `json:"source"`
	Target string `json:"target"`
}

type SonioxSTT deprecated

type SonioxSTT = STT

Deprecated: use STT.

type SonioxSTTOption deprecated added in v0.0.15

type SonioxSTTOption = STTOption

Deprecated: use STTOption.

type SonioxTTS deprecated added in v0.0.15

type SonioxTTS = TTS

Deprecated: use TTS.

type SonioxTTSOption deprecated added in v0.0.15

type SonioxTTSOption = TTSOption

Deprecated: use TTSOption.

type TTS added in v0.4.2

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

func NewSonioxTTS deprecated added in v0.0.15

func NewSonioxTTS(apiKey string, opts ...TTSOption) *TTS

Deprecated: use NewTTS.

func NewTTS added in v0.4.2

func NewTTS(apiKey string, opts ...TTSOption) *TTS

func (*TTS) Capabilities added in v0.4.2

func (t *TTS) Capabilities() tts.TTSCapabilities

func (*TTS) Close added in v0.4.2

func (t *TTS) Close() error

func (*TTS) Label added in v0.4.2

func (t *TTS) Label() string

func (*TTS) Model added in v0.4.2

func (t *TTS) Model() string

func (*TTS) NumChannels added in v0.4.2

func (t *TTS) NumChannels() int

func (*TTS) Provider added in v0.4.2

func (t *TTS) Provider() string

func (*TTS) SampleRate added in v0.4.2

func (t *TTS) SampleRate() int

func (*TTS) Stream added in v0.4.2

func (t *TTS) Stream(ctx context.Context) (tts.SynthesizeStream, error)

func (*TTS) Synthesize added in v0.4.2

func (t *TTS) Synthesize(ctx context.Context, text string) (tts.ChunkedStream, error)

type TTSOption added in v0.4.2

type TTSOption func(*TTS)

func WithSonioxTTSAudioFormat added in v0.0.15

func WithSonioxTTSAudioFormat(audioFormat string) TTSOption

func WithSonioxTTSBitrate added in v0.0.15

func WithSonioxTTSBitrate(bitrate int) TTSOption

func WithSonioxTTSLanguage added in v0.0.15

func WithSonioxTTSLanguage(language string) TTSOption

func WithSonioxTTSModel added in v0.0.15

func WithSonioxTTSModel(model string) TTSOption

func WithSonioxTTSSampleRate added in v0.0.15

func WithSonioxTTSSampleRate(sampleRate int) TTSOption

func WithSonioxTTSVoice added in v0.0.15

func WithSonioxTTSVoice(voice string) TTSOption

func WithSonioxTTSWebsocketURL added in v0.0.15

func WithSonioxTTSWebsocketURL(websocketURL string) TTSOption

Jump to

Keyboard shortcuts

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