deepgram

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNova3Model added in v0.0.6

func IsNova3Model(model string) bool

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 (*DeepgramTTS) Synthesize

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

type Keyword added in v0.0.6

type Keyword struct {
	Keyword string  `json:"keyword"`
	Boost   float64 `json:"boost"`
}

Keyword represents a keyword with a boost weight for Deepgram STT recognition. This is the canonical definition shared between rtp-agent and agent-worker layer.

Jump to

Keyboard shortcuts

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