Documentation
¶
Index ¶
- Constants
- type LLM
- func NewAzureOpenAILLM(model, azureEndpoint, azureDeployment, apiVersion, apiKey, azureADToken string, ...) (*LLM, error)
- func NewCerebrasOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewCometAPIOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewDeepSeekOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewFireworksOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewLLM(apiKey string, model string, opts ...LLMOption) (*LLM, error)
- func NewLettaOpenAILLM(agentID, baseURL, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewNebiusOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewOVHCloudOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewOctoAIOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewOllamaOpenAILLM(model string, opts ...LLMOption) *LLM
- func NewOpenAILLM(apiKey string, model string, opts ...LLMOption) (*LLM, error)deprecated
- func NewOpenAILLMWithBaseURL(apiKey string, model string, baseURL string, opts ...LLMOption) *LLM
- func NewOpenAILLMWithBaseURLAndHTTPClient(apiKey string, model string, baseURL string, httpClient openai.HTTPDoer, ...) *LLM
- func NewOpenRouterLLM(apiKey, model string, opts ...OpenRouterLLMOption) (*LLM, error)
- func NewOpenRouterLLMWithHTTPClient(apiKey, model string, httpClient openai.HTTPDoer, opts ...OpenRouterLLMOption) (*LLM, error)
- func NewPerplexityOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewSambaNovaOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewTelnyxOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewTogetherOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- func NewXAIOpenAILLM(model, apiKey string, opts ...LLMOption) (*LLM, error)
- type LLMOption
- func WithOpenAILLMAzureADTokenProvider(provider func(context.Context) (string, error)) LLMOption
- func WithOpenAILLMAzureBaseURL(baseURL string) LLMOption
- func WithOpenAILLMAzureTimeout(timeout time.Duration) LLMOption
- func WithOpenAILLMDefaultReasoning(defaultReasoning bool) LLMOption
- func WithOpenAILLMExtraBody(body map[string]any) LLMOption
- func WithOpenAILLMExtraHeaders(headers map[string]string) LLMOption
- func WithOpenAILLMExtraParams(params map[string]any) LLMOption
- func WithOpenAILLMExtraQuery(query map[string]string) LLMOption
- func WithOpenAILLMMaxCompletionTokens(maxCompletionTokens int) LLMOption
- func WithOpenAILLMMaxRetries(maxRetries int) LLMOption
- func WithOpenAILLMMetadata(metadata map[string]string) LLMOption
- func WithOpenAILLMOrganization(organization string) LLMOption
- func WithOpenAILLMParallelToolCalls(parallelToolCalls bool) LLMOption
- func WithOpenAILLMProject(project string) LLMOption
- func WithOpenAILLMPromptCacheKey(promptCacheKey string) LLMOption
- func WithOpenAILLMPromptCacheRetention(promptCacheRetention string) LLMOption
- func WithOpenAILLMReasoning(reasoning map[string]any) LLMOption
- func WithOpenAILLMReasoningEffort(reasoningEffort string) LLMOption
- func WithOpenAILLMSafetyIdentifier(safetyIdentifier string) LLMOption
- func WithOpenAILLMServiceTier(serviceTier string) LLMOption
- func WithOpenAILLMStore(store bool) LLMOption
- func WithOpenAILLMStrictToolSchema(strict bool) LLMOption
- func WithOpenAILLMTemperature(temperature float64) LLMOption
- func WithOpenAILLMTimeout(timeout time.Duration) LLMOption
- func WithOpenAILLMToolChoice(toolChoice llm.ToolChoice) LLMOption
- func WithOpenAILLMTopP(topP float64) LLMOption
- func WithOpenAILLMUser(user string) LLMOption
- func WithOpenAILLMVerbosity(verbosity string) LLMOption
- type OpenAILLMdeprecated
- type OpenAILLMOptiondeprecated
- type OpenAIRealtimeFunctionCallFilter
- type OpenAIRealtimeInputTranscriptionFinalHook
- type OpenAIRealtimeOptiondeprecated
- type OpenAIRealtimeRemoteItemAddedHook
- type OpenAIRealtimeSessionCloseMetricsHook
- type OpenAIRealtimeToolFormatter
- type OpenAIRealtimeWebsocketDialer
- type OpenAISTTdeprecated
- type OpenAISTTOptiondeprecated
- type OpenAITTSdeprecated
- type OpenAITTSOptiondeprecated
- type OpenRouterLLMOption
- func WithOpenRouterAppName(appName string) OpenRouterLLMOption
- func WithOpenRouterFallbackModels(models []string) OpenRouterLLMOption
- func WithOpenRouterLLMOptions(opts ...LLMOption) OpenRouterLLMOption
- func WithOpenRouterPlugins(plugins []map[string]any) OpenRouterLLMOption
- func WithOpenRouterProvider(provider map[string]any) OpenRouterLLMOption
- func WithOpenRouterSiteURL(siteURL string) OpenRouterLLMOption
- type RealtimeModel
- func (m *RealtimeModel) Capabilities() llm.RealtimeCapabilities
- func (m *RealtimeModel) Close() error
- func (m *RealtimeModel) Model() string
- func (m *RealtimeModel) Provider() string
- func (m *RealtimeModel) Session() (llm.RealtimeSession, error)
- func (m *RealtimeModel) UpdateOptions(options llm.RealtimeSessionOptions) error
- type RealtimeOption
- func WithOpenAIRealtimeBaseURL(baseURL string) RealtimeOption
- func WithOpenAIRealtimeConnectOptions(connectOptions llm.APIConnectOptions) RealtimeOption
- func WithOpenAIRealtimeFunctionCallFilter(filter OpenAIRealtimeFunctionCallFilter) RealtimeOption
- func WithOpenAIRealtimeInputAudioNoiseReduction(noiseReduction any) RealtimeOption
- func WithOpenAIRealtimeInputAudioTranscription(transcription any) RealtimeOption
- func WithOpenAIRealtimeInputTranscriptionFinalHook(hook OpenAIRealtimeInputTranscriptionFinalHook) RealtimeOption
- func WithOpenAIRealtimeMaxResponseOutputTokens(tokens any) RealtimeOption
- func WithOpenAIRealtimeMaxSessionDuration(duration time.Duration) RealtimeOption
- func WithOpenAIRealtimeModalities(modalities []string) RealtimeOption
- func WithOpenAIRealtimeReasoning(reasoning any) RealtimeOption
- func WithOpenAIRealtimeRemoteItemAddedHook(hook OpenAIRealtimeRemoteItemAddedHook) RealtimeOption
- func WithOpenAIRealtimeSessionCloseMetricsHook(hook OpenAIRealtimeSessionCloseMetricsHook) RealtimeOption
- func WithOpenAIRealtimeSpeed(speed float64) RealtimeOption
- func WithOpenAIRealtimeToolChoice(toolChoice llm.ToolChoice) RealtimeOption
- func WithOpenAIRealtimeToolFormatter(formatter OpenAIRealtimeToolFormatter) RealtimeOption
- func WithOpenAIRealtimeTracing(tracing any) RealtimeOption
- func WithOpenAIRealtimeTruncation(truncation any) RealtimeOption
- func WithOpenAIRealtimeTurnDetection(turnDetection any) RealtimeOption
- func WithOpenAIRealtimeVoice(voice string) RealtimeOption
- func WithOpenAIRealtimeWebsocketDialer(dialer OpenAIRealtimeWebsocketDialer) RealtimeOption
- type STT
- func NewAzureOpenAISTT(model, azureEndpoint, azureDeployment, apiVersion, apiKey, azureADToken string, ...) (*STT, error)
- func NewOVHCloudOpenAISTT(model, apiKey string, opts ...STTOption) (*STT, error)
- func NewOpenAISTT(apiKey string, model string, opts ...STTOption) (*STT, error)deprecated
- func NewSTT(apiKey string, model string, opts ...STTOption) (*STT, error)
- func (s *STT) Capabilities() stt.STTCapabilities
- func (s *STT) Close() error
- func (s *STT) Label() string
- func (s *STT) Model() string
- func (s *STT) Provider() string
- func (s *STT) Recognize(ctx context.Context, frames []*model.AudioFrame, language string) (*stt.SpeechEvent, error)
- func (s *STT) Stream(ctx context.Context, language string) (stt.RecognizeStream, error)
- func (s *STT) UpdateOptions(opts ...STTOption)
- type STTOption
- func WithOpenAISTTAzureADTokenProvider(provider func(context.Context) (string, error)) STTOption
- func WithOpenAISTTBaseURL(baseURL string) STTOption
- func WithOpenAISTTConnectOptions(connectOptions llm.APIConnectOptions) STTOption
- func WithOpenAISTTDetectLanguage(detect bool) STTOption
- func WithOpenAISTTHTTPClient(client openai.HTTPDoer) STTOption
- func WithOpenAISTTLanguage(language string) STTOption
- func WithOpenAISTTModel(model string) STTOption
- func WithOpenAISTTNoiseReductionType(noiseReductionType string) STTOption
- func WithOpenAISTTOrganization(organization string) STTOption
- func WithOpenAISTTProject(project string) STTOption
- func WithOpenAISTTPrompt(prompt string) STTOption
- func WithOpenAISTTRealtime(useRealtime bool) STTOption
- func WithOpenAISTTTurnDetection(turnDetection map[string]interface{}) STTOption
- func WithOpenAISTTVAD(v vad.VAD) STTOption
- type TTS
- func NewAzureOpenAITTS(model openai.SpeechModel, voice openai.SpeechVoice, ...) (*TTS, error)
- func NewOpenAITTS(apiKey string, model openai.SpeechModel, voice openai.SpeechVoice, ...) (*TTS, error)deprecated
- func NewTTS(apiKey string, model openai.SpeechModel, voice openai.SpeechVoice, ...) (*TTS, error)
- func (t *TTS) Capabilities() tts.TTSCapabilities
- func (t *TTS) Close() error
- func (t *TTS) Label() string
- func (t *TTS) Model() string
- func (t *TTS) NumChannels() int
- func (t *TTS) Prewarm()
- func (t *TTS) Provider() string
- func (t *TTS) SampleRate() int
- func (t *TTS) Stream(ctx context.Context) (tts.SynthesizeStream, error)
- func (t *TTS) Synthesize(ctx context.Context, text string) (tts.ChunkedStream, error)
- func (t *TTS) UpdateOptions(opts ...TTSOption)
- type TTSOption
- func WithOpenAITTSAzureADTokenProvider(provider func(context.Context) (string, error)) TTSOption
- func WithOpenAITTSBaseURL(baseURL string) TTSOption
- func WithOpenAITTSInstructions(instructions string) TTSOption
- func WithOpenAITTSModel(model openai.SpeechModel) TTSOption
- func WithOpenAITTSOrganization(organization string) TTSOption
- func WithOpenAITTSProject(project string) TTSOption
- func WithOpenAITTSResponseFormat(format openai.SpeechResponseFormat) TTSOption
- func WithOpenAITTSSpeed(speed float64) TTSOption
- func WithOpenAITTSVoice(voice openai.SpeechVoice) TTSOption
Constants ¶
View Source
const ( PluginTitle = "rtp-agent.plugins.openai" PluginVersion = "v0.4.2" PluginPackage = "rtp-agent.plugins.openai" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LLM ¶ added in v0.4.2
type LLM struct {
// contains filtered or unexported fields
}
func NewAzureOpenAILLM ¶ added in v0.0.15
func NewCerebrasOpenAILLM ¶ added in v0.0.19
func NewCometAPIOpenAILLM ¶ added in v0.0.19
func NewDeepSeekOpenAILLM ¶ added in v0.0.19
func NewFireworksOpenAILLM ¶ added in v0.0.19
func NewLettaOpenAILLM ¶ added in v0.0.19
func NewNebiusOpenAILLM ¶ added in v0.0.19
func NewOVHCloudOpenAILLM ¶ added in v0.0.19
func NewOctoAIOpenAILLM ¶ added in v0.0.19
func NewOllamaOpenAILLM ¶ added in v0.0.19
func NewOpenAILLMWithBaseURL ¶
func NewOpenAILLMWithBaseURLAndHTTPClient ¶ added in v0.0.15
func NewOpenRouterLLM ¶ added in v0.0.15
func NewOpenRouterLLM(apiKey, model string, opts ...OpenRouterLLMOption) (*LLM, error)
func NewOpenRouterLLMWithHTTPClient ¶ added in v0.0.15
func NewPerplexityOpenAILLM ¶ added in v0.0.19
func NewSambaNovaOpenAILLM ¶ added in v0.0.19
func NewTelnyxOpenAILLM ¶ added in v0.0.19
func NewTogetherOpenAILLM ¶ added in v0.0.19
func NewXAIOpenAILLM ¶ added in v0.0.19
type LLMOption ¶ added in v0.4.2
type LLMOption func(*LLM)
func WithOpenAILLMAzureADTokenProvider ¶ added in v0.1.2
func WithOpenAILLMAzureBaseURL ¶ added in v0.1.2
func WithOpenAILLMAzureTimeout ¶ added in v0.1.2
func WithOpenAILLMDefaultReasoning ¶ added in v0.1.0
func WithOpenAILLMExtraBody ¶ added in v0.0.15
func WithOpenAILLMExtraHeaders ¶ added in v0.0.15
func WithOpenAILLMExtraParams ¶ added in v0.1.0
func WithOpenAILLMExtraQuery ¶ added in v0.0.15
func WithOpenAILLMMaxCompletionTokens ¶ added in v0.0.15
func WithOpenAILLMMaxRetries ¶ added in v0.1.3
func WithOpenAILLMMetadata ¶ added in v0.0.15
func WithOpenAILLMOrganization ¶ added in v0.1.2
func WithOpenAILLMParallelToolCalls ¶ added in v0.0.15
func WithOpenAILLMProject ¶ added in v0.1.2
func WithOpenAILLMPromptCacheKey ¶ added in v0.0.15
func WithOpenAILLMPromptCacheRetention ¶ added in v0.0.15
func WithOpenAILLMReasoning ¶ added in v0.1.2
func WithOpenAILLMReasoningEffort ¶ added in v0.0.15
func WithOpenAILLMSafetyIdentifier ¶ added in v0.0.15
func WithOpenAILLMServiceTier ¶ added in v0.0.15
func WithOpenAILLMStore ¶ added in v0.0.15
func WithOpenAILLMStrictToolSchema ¶ added in v0.0.19
func WithOpenAILLMTemperature ¶ added in v0.0.15
func WithOpenAILLMTimeout ¶ added in v0.1.3
func WithOpenAILLMToolChoice ¶ added in v0.0.15
func WithOpenAILLMToolChoice(toolChoice llm.ToolChoice) LLMOption
func WithOpenAILLMTopP ¶ added in v0.0.15
func WithOpenAILLMUser ¶ added in v0.0.15
func WithOpenAILLMVerbosity ¶ added in v0.0.15
type OpenAILLMOption
deprecated
added in
v0.0.15
type OpenAILLMOption = LLMOption
Deprecated: use LLMOption.
type OpenAIRealtimeFunctionCallFilter ¶ added in v0.1.0
type OpenAIRealtimeInputTranscriptionFinalHook ¶ added in v0.1.0
type OpenAIRealtimeInputTranscriptionFinalHook func(*llm.ChatMessage, *llm.InputTranscriptionCompleted)
type OpenAIRealtimeOption
deprecated
added in
v0.0.15
type OpenAIRealtimeOption = RealtimeOption
Deprecated: use RealtimeOption.
type OpenAIRealtimeRemoteItemAddedHook ¶ added in v0.1.0
type OpenAIRealtimeRemoteItemAddedHook func(*llm.RemoteChatContext, *llm.RemoteItemAddedEvent)
type OpenAIRealtimeSessionCloseMetricsHook ¶ added in v0.1.0
type OpenAIRealtimeSessionCloseMetricsHook func(time.Duration) *telemetry.RealtimeModelMetrics
type OpenAIRealtimeToolFormatter ¶ added in v0.1.0
type OpenAIRealtimeWebsocketDialer ¶ added in v0.1.0
type OpenAISTTOption
deprecated
added in
v0.0.15
type OpenAISTTOption = STTOption
Deprecated: use STTOption.
type OpenAITTSOption
deprecated
added in
v0.0.15
type OpenAITTSOption = TTSOption
Deprecated: use TTSOption.
type OpenRouterLLMOption ¶ added in v0.0.15
type OpenRouterLLMOption func(*openRouterLLMOptions)
func WithOpenRouterAppName ¶ added in v0.0.15
func WithOpenRouterAppName(appName string) OpenRouterLLMOption
func WithOpenRouterFallbackModels ¶ added in v0.0.15
func WithOpenRouterFallbackModels(models []string) OpenRouterLLMOption
func WithOpenRouterLLMOptions ¶ added in v0.0.15
func WithOpenRouterLLMOptions(opts ...LLMOption) OpenRouterLLMOption
func WithOpenRouterPlugins ¶ added in v0.0.15
func WithOpenRouterPlugins(plugins []map[string]any) OpenRouterLLMOption
func WithOpenRouterProvider ¶ added in v0.0.15
func WithOpenRouterProvider(provider map[string]any) OpenRouterLLMOption
func WithOpenRouterSiteURL ¶ added in v0.0.15
func WithOpenRouterSiteURL(siteURL string) OpenRouterLLMOption
type RealtimeModel ¶
type RealtimeModel struct {
// contains filtered or unexported fields
}
func NewAzureOpenAIRealtimeModel ¶ added in v0.1.0
func NewAzureOpenAIRealtimeModel(model, azureEndpoint, azureDeployment, apiVersion, apiKey, azureADToken string, opts ...RealtimeOption) (*RealtimeModel, error)
func NewRealtimeModel ¶
func NewRealtimeModel(apiKey, model string, opts ...RealtimeOption) *RealtimeModel
func (*RealtimeModel) Capabilities ¶ added in v0.0.15
func (m *RealtimeModel) Capabilities() llm.RealtimeCapabilities
func (*RealtimeModel) Close ¶ added in v0.0.15
func (m *RealtimeModel) Close() error
func (*RealtimeModel) Model ¶ added in v0.0.15
func (m *RealtimeModel) Model() string
func (*RealtimeModel) Provider ¶ added in v0.0.15
func (m *RealtimeModel) Provider() string
func (*RealtimeModel) Session ¶
func (m *RealtimeModel) Session() (llm.RealtimeSession, error)
func (*RealtimeModel) UpdateOptions ¶ added in v0.0.15
func (m *RealtimeModel) UpdateOptions(options llm.RealtimeSessionOptions) error
type RealtimeOption ¶ added in v0.4.2
type RealtimeOption func(*openAIRealtimeModelOptions)
func WithOpenAIRealtimeBaseURL ¶ added in v0.0.15
func WithOpenAIRealtimeBaseURL(baseURL string) RealtimeOption
func WithOpenAIRealtimeConnectOptions ¶ added in v0.1.0
func WithOpenAIRealtimeConnectOptions(connectOptions llm.APIConnectOptions) RealtimeOption
func WithOpenAIRealtimeFunctionCallFilter ¶ added in v0.1.0
func WithOpenAIRealtimeFunctionCallFilter(filter OpenAIRealtimeFunctionCallFilter) RealtimeOption
func WithOpenAIRealtimeInputAudioNoiseReduction ¶ added in v0.0.15
func WithOpenAIRealtimeInputAudioNoiseReduction(noiseReduction any) RealtimeOption
func WithOpenAIRealtimeInputAudioTranscription ¶ added in v0.0.15
func WithOpenAIRealtimeInputAudioTranscription(transcription any) RealtimeOption
func WithOpenAIRealtimeInputTranscriptionFinalHook ¶ added in v0.1.0
func WithOpenAIRealtimeInputTranscriptionFinalHook(hook OpenAIRealtimeInputTranscriptionFinalHook) RealtimeOption
func WithOpenAIRealtimeMaxResponseOutputTokens ¶ added in v0.0.15
func WithOpenAIRealtimeMaxResponseOutputTokens(tokens any) RealtimeOption
func WithOpenAIRealtimeMaxSessionDuration ¶ added in v0.1.0
func WithOpenAIRealtimeMaxSessionDuration(duration time.Duration) RealtimeOption
func WithOpenAIRealtimeModalities ¶ added in v0.0.15
func WithOpenAIRealtimeModalities(modalities []string) RealtimeOption
func WithOpenAIRealtimeReasoning ¶ added in v0.1.0
func WithOpenAIRealtimeReasoning(reasoning any) RealtimeOption
func WithOpenAIRealtimeRemoteItemAddedHook ¶ added in v0.1.0
func WithOpenAIRealtimeRemoteItemAddedHook(hook OpenAIRealtimeRemoteItemAddedHook) RealtimeOption
func WithOpenAIRealtimeSessionCloseMetricsHook ¶ added in v0.1.0
func WithOpenAIRealtimeSessionCloseMetricsHook(hook OpenAIRealtimeSessionCloseMetricsHook) RealtimeOption
func WithOpenAIRealtimeSpeed ¶ added in v0.0.15
func WithOpenAIRealtimeSpeed(speed float64) RealtimeOption
func WithOpenAIRealtimeToolChoice ¶ added in v0.0.15
func WithOpenAIRealtimeToolChoice(toolChoice llm.ToolChoice) RealtimeOption
func WithOpenAIRealtimeToolFormatter ¶ added in v0.1.0
func WithOpenAIRealtimeToolFormatter(formatter OpenAIRealtimeToolFormatter) RealtimeOption
func WithOpenAIRealtimeTracing ¶ added in v0.0.15
func WithOpenAIRealtimeTracing(tracing any) RealtimeOption
func WithOpenAIRealtimeTruncation ¶ added in v0.0.15
func WithOpenAIRealtimeTruncation(truncation any) RealtimeOption
func WithOpenAIRealtimeTurnDetection ¶ added in v0.0.15
func WithOpenAIRealtimeTurnDetection(turnDetection any) RealtimeOption
func WithOpenAIRealtimeVoice ¶ added in v0.0.15
func WithOpenAIRealtimeVoice(voice string) RealtimeOption
func WithOpenAIRealtimeWebsocketDialer ¶ added in v0.1.0
func WithOpenAIRealtimeWebsocketDialer(dialer OpenAIRealtimeWebsocketDialer) RealtimeOption
type STT ¶ added in v0.4.2
type STT struct {
// contains filtered or unexported fields
}
func NewAzureOpenAISTT ¶ added in v0.0.15
func NewOVHCloudOpenAISTT ¶ added in v0.0.19
func (*STT) Capabilities ¶ added in v0.4.2
func (s *STT) Capabilities() stt.STTCapabilities
func (*STT) Recognize ¶ added in v0.4.2
func (s *STT) Recognize(ctx context.Context, frames []*model.AudioFrame, language string) (*stt.SpeechEvent, error)
func (*STT) UpdateOptions ¶ added in v0.4.2
type STTOption ¶ added in v0.4.2
type STTOption func(*STT)
func WithOpenAISTTAzureADTokenProvider ¶ added in v0.1.4
func WithOpenAISTTBaseURL ¶ added in v0.0.15
func WithOpenAISTTConnectOptions ¶ added in v0.1.0
func WithOpenAISTTConnectOptions(connectOptions llm.APIConnectOptions) STTOption
func WithOpenAISTTDetectLanguage ¶ added in v0.0.15
func WithOpenAISTTHTTPClient ¶ added in v0.1.3
func WithOpenAISTTLanguage ¶ added in v0.0.15
func WithOpenAISTTModel ¶ added in v0.0.15
func WithOpenAISTTNoiseReductionType ¶ added in v0.0.15
func WithOpenAISTTOrganization ¶ added in v0.1.4
func WithOpenAISTTProject ¶ added in v0.1.4
func WithOpenAISTTPrompt ¶ added in v0.0.15
func WithOpenAISTTRealtime ¶ added in v0.0.15
func WithOpenAISTTTurnDetection ¶ added in v0.0.15
func WithOpenAISTTVAD ¶ added in v0.1.0
type TTS ¶ added in v0.4.2
type TTS struct {
tts.MetricsEmitter
// contains filtered or unexported fields
}
func NewAzureOpenAITTS ¶ added in v0.0.15
func NewAzureOpenAITTS(model openai.SpeechModel, voice openai.SpeechVoice, azureEndpoint, azureDeployment, apiVersion, apiKey, azureADToken string, opts ...TTSOption) (*TTS, error)
func NewOpenAITTS
deprecated
func NewOpenAITTS(apiKey string, model openai.SpeechModel, voice openai.SpeechVoice, opts ...TTSOption) (*TTS, error)
Deprecated: use NewTTS.
func NewTTS ¶ added in v0.4.2
func NewTTS(apiKey string, model openai.SpeechModel, voice openai.SpeechVoice, opts ...TTSOption) (*TTS, error)
func (*TTS) Capabilities ¶ added in v0.4.2
func (t *TTS) Capabilities() tts.TTSCapabilities
func (*TTS) NumChannels ¶ added in v0.4.2
func (*TTS) SampleRate ¶ added in v0.4.2
func (*TTS) Synthesize ¶ added in v0.4.2
func (*TTS) UpdateOptions ¶ added in v0.4.2
type TTSOption ¶ added in v0.4.2
type TTSOption func(*TTS)
func WithOpenAITTSAzureADTokenProvider ¶ added in v0.1.4
func WithOpenAITTSBaseURL ¶ added in v0.0.15
func WithOpenAITTSInstructions ¶ added in v0.0.15
func WithOpenAITTSModel ¶ added in v0.0.15
func WithOpenAITTSModel(model openai.SpeechModel) TTSOption
func WithOpenAITTSOrganization ¶ added in v0.1.4
func WithOpenAITTSProject ¶ added in v0.1.4
func WithOpenAITTSResponseFormat ¶ added in v0.0.15
func WithOpenAITTSResponseFormat(format openai.SpeechResponseFormat) TTSOption
func WithOpenAITTSSpeed ¶ added in v0.0.15
func WithOpenAITTSVoice ¶ added in v0.0.15
func WithOpenAITTSVoice(voice openai.SpeechVoice) TTSOption
Click to show internal directories.
Click to hide internal directories.