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
IsValidGeminiVoice checks if a voice name is valid
func ListGeminiVoices ¶ added in v1.4.268
ListGeminiVoices formats the voice list for display
Types ¶
type Client ¶
type Client struct {
*plugins.PluginBase
ApiKey *plugins.SetupQuestion
}
func (*Client) ListModels ¶
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
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
Click to show internal directories.
Click to hide internal directories.