Documentation
¶
Index ¶
- func IsNova3Model(model string) bool
- type DeepgramOption
- type DeepgramSTT
- func (s *DeepgramSTT) Capabilities() stt.STTCapabilities
- func (s *DeepgramSTT) Label() string
- func (s *DeepgramSTT) Recognize(ctx context.Context, frames []*model.AudioFrame, languageStr string) (*stt.SpeechEvent, error)
- func (s *DeepgramSTT) Stream(ctx context.Context, languageStr string) (stt.RecognizeStream, error)
- type DeepgramTTS
- func (t *DeepgramTTS) Capabilities() tts.TTSCapabilities
- func (t *DeepgramTTS) Label() string
- func (t *DeepgramTTS) NumChannels() int
- func (t *DeepgramTTS) SampleRate() int
- func (t *DeepgramTTS) Stream(ctx context.Context) (tts.SynthesizeStream, error)
- func (t *DeepgramTTS) Synthesize(ctx context.Context, text string) (tts.ChunkedStream, error)
- type Keyword
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNova3Model ¶ added in v0.0.6
IsNova3Model returns true if the model string indicates a nova-3 or newer model. This is exported for use by application-layer logic to determine keyword parameters.
Types ¶
type DeepgramOption ¶ added in v0.0.6
type DeepgramOption func(*DeepgramSTT)
DeepgramOption is a functional option for configuring DeepgramSTT.
func WithKeyterms ¶ added in v0.0.6
func WithKeyterms(keyterms []string) DeepgramOption
WithKeyterms sets the keyterms (for nova-3 and newer models). Keyterms are passed as keyword strings only (no boost weight) in the Deepgram API.
func WithKeywords ¶ added in v0.0.6
func WithKeywords(keywords []Keyword) DeepgramOption
WithKeywords sets the keywords with boost weights (for nova-2 and older models). Keywords are passed as "keyword:boostInt" format in the Deepgram API.
type DeepgramSTT ¶
type DeepgramSTT struct {
// contains filtered or unexported fields
}
func NewDeepgramSTT ¶
func NewDeepgramSTT(apiKey string, model string, opts ...DeepgramOption) *DeepgramSTT
func (*DeepgramSTT) Capabilities ¶
func (s *DeepgramSTT) Capabilities() stt.STTCapabilities
func (*DeepgramSTT) Label ¶
func (s *DeepgramSTT) Label() string
func (*DeepgramSTT) Recognize ¶
func (s *DeepgramSTT) Recognize(ctx context.Context, frames []*model.AudioFrame, languageStr string) (*stt.SpeechEvent, error)
func (*DeepgramSTT) Stream ¶
func (s *DeepgramSTT) Stream(ctx context.Context, languageStr string) (stt.RecognizeStream, error)
type DeepgramTTS ¶
type DeepgramTTS struct {
// contains filtered or unexported fields
}
func NewDeepgramTTS ¶
func NewDeepgramTTS(apiKey string, model string) *DeepgramTTS
func (*DeepgramTTS) Capabilities ¶
func (t *DeepgramTTS) Capabilities() tts.TTSCapabilities
func (*DeepgramTTS) Label ¶
func (t *DeepgramTTS) Label() string
func (*DeepgramTTS) NumChannels ¶
func (t *DeepgramTTS) NumChannels() int
func (*DeepgramTTS) SampleRate ¶
func (t *DeepgramTTS) SampleRate() int
func (*DeepgramTTS) Stream ¶
func (t *DeepgramTTS) Stream(ctx context.Context) (tts.SynthesizeStream, error)
func (*DeepgramTTS) Synthesize ¶
func (t *DeepgramTTS) Synthesize(ctx context.Context, text string) (tts.ChunkedStream, error)
Click to show internal directories.
Click to hide internal directories.