google

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeminiTTS added in v0.0.6

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

func NewGeminiTTS added in v0.0.6

func NewGeminiTTS(apiKey, model, voiceName, instructions string) (*GeminiTTS, error)

func (*GeminiTTS) Capabilities added in v0.0.6

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

func (*GeminiTTS) Label added in v0.0.6

func (t *GeminiTTS) Label() string

func (*GeminiTTS) NumChannels added in v0.0.6

func (t *GeminiTTS) NumChannels() int

func (*GeminiTTS) SampleRate added in v0.0.6

func (t *GeminiTTS) SampleRate() int

func (*GeminiTTS) Stream added in v0.0.6

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

func (*GeminiTTS) Synthesize added in v0.0.6

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

type GoogleLLM

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

func NewGoogleLLM

func NewGoogleLLM(apiKey string, model string) (*GoogleLLM, error)

func (*GoogleLLM) Chat

func (l *GoogleLLM) Chat(ctx context.Context, chatCtx *llm.ChatContext, opts ...llm.ChatOption) (llm.LLMStream, error)

type GoogleOption added in v0.0.6

type GoogleOption func(*GoogleSTT)

GoogleOption is a functional option for configuring GoogleSTT.

func WithPhraseHints added in v0.0.6

func WithPhraseHints(phraseHints []*speechpb.SpeechContext) GoogleOption

WithPhraseHints returns a GoogleOption that configures phrase hints (speech contexts) for improving recognition accuracy on domain-specific vocabulary.

type GoogleSTT

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

func NewGoogleSTT

func NewGoogleSTT(credentialsFile string, opts ...GoogleOption) (*GoogleSTT, error)

NewGoogleSTT creates a new STT client using Application Default Credentials, or by providing a path to a credentials JSON file. Optional GoogleOptions can be passed to configure features like phrase hints.

func (*GoogleSTT) Capabilities

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

func (*GoogleSTT) Label

func (s *GoogleSTT) Label() string

func (*GoogleSTT) Recognize

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

func (*GoogleSTT) Stream

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

type GoogleTTS

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

func NewGoogleTTS

func NewGoogleTTS(credentialsFile string) (*GoogleTTS, error)

NewGoogleTTS creates a new TTS client using Application Default Credentials, or by providing a path to a credentials JSON file.

func (*GoogleTTS) Capabilities

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

func (*GoogleTTS) Label

func (t *GoogleTTS) Label() string

func (*GoogleTTS) NumChannels

func (t *GoogleTTS) NumChannels() int

func (*GoogleTTS) SampleRate

func (t *GoogleTTS) SampleRate() int

func (*GoogleTTS) Stream

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

func (*GoogleTTS) Synthesize

func (t *GoogleTTS) 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