gnani

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: 18 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*TTS)

func WithBaseURL

func WithBaseURL(baseURL string) Option

func WithContainer

func WithContainer(container string) Option

func WithEncoding

func WithEncoding(encoding string) Option

func WithLanguage

func WithLanguage(language string) Option

func WithModel

func WithModel(model string) Option

func WithNumChannels

func WithNumChannels(numChannels int) Option

func WithSampleRate

func WithSampleRate(sampleRate int) Option

func WithSampleWidth

func WithSampleWidth(sampleWidth int) Option

func WithVoice

func WithVoice(voice string) Option

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 WithSTTLanguage

func WithSTTLanguage(language string) STTOption

func WithSTTOrganizationID

func WithSTTOrganizationID(organizationID string) STTOption

func WithSTTSampleRate

func WithSTTSampleRate(sampleRate int) STTOption

func WithSTTUserID

func WithSTTUserID(userID string) STTOption

type TTS

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

func NewTTS

func NewTTS(apiKey string, opts ...Option) *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)

Jump to

Keyboard shortcuts

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