soniox

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

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

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

func NewSonioxSTT

func NewSonioxSTT(apiKey string, opts ...SonioxSTTOption) *SonioxSTT

func (*SonioxSTT) Capabilities

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

func (*SonioxSTT) InputSampleRate added in v0.1.0

func (s *SonioxSTT) InputSampleRate() uint32

func (*SonioxSTT) Label

func (s *SonioxSTT) Label() string

func (*SonioxSTT) Model added in v0.0.18

func (s *SonioxSTT) Model() string

func (*SonioxSTT) Provider added in v0.0.18

func (s *SonioxSTT) Provider() string

func (*SonioxSTT) Recognize

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

func (*SonioxSTT) Stream

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

type SonioxSTTOption added in v0.0.15

type SonioxSTTOption func(*SonioxSTT)

func WithSonioxBaseURL added in v0.0.15

func WithSonioxBaseURL(baseURL string) SonioxSTTOption

func WithSonioxClientReferenceID added in v0.0.15

func WithSonioxClientReferenceID(clientReferenceID string) SonioxSTTOption

func WithSonioxContextObject added in v0.0.15

func WithSonioxContextObject(context SonioxContextObject) SonioxSTTOption

func WithSonioxContextText added in v0.0.15

func WithSonioxContextText(context string) SonioxSTTOption

func WithSonioxLanguageHints added in v0.0.15

func WithSonioxLanguageHints(languageHints []string) SonioxSTTOption

func WithSonioxLanguageHintsStrict added in v0.0.15

func WithSonioxLanguageHintsStrict(strict bool) SonioxSTTOption

func WithSonioxLanguageIdentification added in v0.0.15

func WithSonioxLanguageIdentification(enabled bool) SonioxSTTOption

func WithSonioxMaxEndpointDelayMS added in v0.0.15

func WithSonioxMaxEndpointDelayMS(ms int) SonioxSTTOption

func WithSonioxModel added in v0.0.15

func WithSonioxModel(model string) SonioxSTTOption

func WithSonioxNumChannels added in v0.0.15

func WithSonioxNumChannels(numChannels int) SonioxSTTOption

func WithSonioxOneWayTranslation added in v0.0.15

func WithSonioxOneWayTranslation(targetLanguage string) SonioxSTTOption

func WithSonioxSampleRate added in v0.0.15

func WithSonioxSampleRate(sampleRate int) SonioxSTTOption

func WithSonioxSpeakerDiarization added in v0.0.15

func WithSonioxSpeakerDiarization(enabled bool) SonioxSTTOption

func WithSonioxTwoWayTranslation added in v0.0.15

func WithSonioxTwoWayTranslation(languageA string, languageB string) SonioxSTTOption

type SonioxTTS added in v0.0.15

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

func NewSonioxTTS added in v0.0.15

func NewSonioxTTS(apiKey string, opts ...SonioxTTSOption) *SonioxTTS

func (*SonioxTTS) Capabilities added in v0.0.15

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

func (*SonioxTTS) Close added in v0.1.0

func (t *SonioxTTS) Close() error

func (*SonioxTTS) Label added in v0.0.15

func (t *SonioxTTS) Label() string

func (*SonioxTTS) Model added in v0.0.18

func (t *SonioxTTS) Model() string

func (*SonioxTTS) NumChannels added in v0.0.15

func (t *SonioxTTS) NumChannels() int

func (*SonioxTTS) Provider added in v0.0.18

func (t *SonioxTTS) Provider() string

func (*SonioxTTS) SampleRate added in v0.0.15

func (t *SonioxTTS) SampleRate() int

func (*SonioxTTS) Stream added in v0.0.15

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

func (*SonioxTTS) Synthesize added in v0.0.15

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

type SonioxTTSOption added in v0.0.15

type SonioxTTSOption func(*SonioxTTS)

func WithSonioxTTSAudioFormat added in v0.0.15

func WithSonioxTTSAudioFormat(audioFormat string) SonioxTTSOption

func WithSonioxTTSBitrate added in v0.0.15

func WithSonioxTTSBitrate(bitrate int) SonioxTTSOption

func WithSonioxTTSLanguage added in v0.0.15

func WithSonioxTTSLanguage(language string) SonioxTTSOption

func WithSonioxTTSModel added in v0.0.15

func WithSonioxTTSModel(model string) SonioxTTSOption

func WithSonioxTTSSampleRate added in v0.0.15

func WithSonioxTTSSampleRate(sampleRate int) SonioxTTSOption

func WithSonioxTTSVoice added in v0.0.15

func WithSonioxTTSVoice(voice string) SonioxTTSOption

func WithSonioxTTSWebsocketURL added in v0.0.15

func WithSonioxTTSWebsocketURL(websocketURL string) SonioxTTSOption

Jump to

Keyboard shortcuts

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