slng

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginTitle   = "rtp-agent.plugins.slng"
	PluginVersion = "1.5.15"
	PluginPackage = "rtp-agent.plugins.slng"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type STT

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

func NewSTT

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

func (*STT) Capabilities

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

func (*STT) Label

func (s *STT) Label() string

func (*STT) Model added in v0.0.18

func (s *STT) Model() string

func (*STT) Provider added in v0.0.18

func (s *STT) Provider() string

func (*STT) Recognize

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

func (*STT) Stream

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

type STTOption

type STTOption func(*STT)

func WithSTTBaseURL

func WithSTTBaseURL(baseURL string) STTOption

func WithSTTDiarization

func WithSTTDiarization(enabled bool, minSpeakers, maxSpeakers int) STTOption

func WithSTTEncoding

func WithSTTEncoding(encoding string) STTOption

func WithSTTEndpoint

func WithSTTEndpoint(endpoint string) STTOption

func WithSTTLanguage

func WithSTTLanguage(language string) STTOption

func WithSTTModel

func WithSTTModel(modelName string) STTOption

func WithSTTModelOptions

func WithSTTModelOptions(options map[string]any) STTOption

func WithSTTPartialTranscripts

func WithSTTPartialTranscripts(enabled bool) STTOption

func WithSTTRegionOverride

func WithSTTRegionOverride(region any) STTOption

type TTS

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

func NewTTS

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

func (*TTS) Capabilities

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

func (*TTS) Label

func (t *TTS) Label() string

func (*TTS) Model added in v0.0.18

func (t *TTS) Model() string

func (*TTS) NumChannels

func (t *TTS) NumChannels() int

func (*TTS) Provider added in v0.0.18

func (t *TTS) Provider() string

func (*TTS) SampleRate

func (t *TTS) SampleRate() int

func (*TTS) Stream

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

func (*TTS) Synthesize

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

type TTSOption

type TTSOption func(*TTS)

func WithTTSBaseURL

func WithTTSBaseURL(baseURL string) TTSOption

func WithTTSEndpoint

func WithTTSEndpoint(endpoint string) TTSOption

func WithTTSLanguage

func WithTTSLanguage(language string) TTSOption

func WithTTSModel

func WithTTSModel(modelName string) TTSOption

func WithTTSModelOptions

func WithTTSModelOptions(options map[string]any) TTSOption

func WithTTSRegionOverride

func WithTTSRegionOverride(region any) TTSOption

func WithTTSSampleRate

func WithTTSSampleRate(sampleRate int) TTSOption

func WithTTSSpeed

func WithTTSSpeed(speed float64) TTSOption

func WithTTSVoice

func WithTTSVoice(voice string) TTSOption

Jump to

Keyboard shortcuts

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