gemini

package
v1.4.556 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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(ctx 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(ctx 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