Help us shape the future of Go! Take the 2026 Go Developer Survey

gemini

package
v1.4.550 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultChannels      = 1
	DefaultSampleRate    = 24000
	DefaultBitsPerSample = 16
	WAVHeaderSize        = 44
	RIFFHeaderSize       = 36
	MaxAudioDataSize     = 100 * 1024 * 1024 // 100MB limit for security
	MinAudioDataSize     = 44                // Minimum viable audio data
	AudioDataPrefix      = "FABRIC_AUDIO_DATA:"
)

WAV audio constants

Variables

This section is empty.

Functions

func GetGeminiVoiceNames added in v1.4.268

func GetGeminiVoiceNames() []string

GetGeminiVoiceNames returns just the voice names in alphabetical order

func IsValidGeminiVoice added in v1.4.268

func IsValidGeminiVoice(voiceName string) bool

IsValidGeminiVoice checks if a voice name is valid

func ListGeminiVoices added in v1.4.268

func ListGeminiVoices(shellCompleteMode bool) string

ListGeminiVoices formats the voice list for display

Types

type Client

type Client struct {
	*plugins.PluginBase
	ApiKey *plugins.SetupQuestion
}

func NewClient

func NewClient() (ret *Client)

func (*Client) ListModels

func (o *Client) ListModels(_ context.Context) (ret []string, err error)

func (*Client) Send

func (o *Client) Send(ctx context.Context, msgs []*chat.ChatCompletionMessage, opts *domain.ChatOptions) (ret string, err error)

func (*Client) SendStream

func (o *Client) SendStream(_ context.Context, msgs []*chat.ChatCompletionMessage, opts *domain.ChatOptions, channel chan domain.StreamUpdate) (err error)

type GeminiVoice added in v1.4.268

type GeminiVoice struct {
	Name            string
	Description     string
	Characteristics []string
}

GeminiVoice represents a Gemini TTS voice with its characteristics

func GetGeminiVoiceByName added in v1.4.268

func GetGeminiVoiceByName(name string) (*GeminiVoice, error)

GetGeminiVoiceByName returns a specific voice by name

func GetGeminiVoices added in v1.4.268

func GetGeminiVoices() []GeminiVoice

GetGeminiVoices returns the current list of supported Gemini TTS voices This list is maintained based on official Google Gemini documentation https://ai.google.dev/gemini-api/docs/speech-generation

Jump to

Keyboard shortcuts

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