Documentation
¶
Overview ¶
Package audioproviders implements audio.tts.Generation and audio.stt.SpeechToText for supported providers. Add a new file per provider (elevenlabs_tts.go, deepgram_stt.go, …) — no other package needs updating.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenAISTT ¶
type OpenAISTT struct {
// contains filtered or unexported fields
}
OpenAISTT transcribes audio using OpenAI Whisper.
func NewOpenAISTT ¶
func NewOpenAISTT(apiKey string, opts ...OpenAISTTOption) *OpenAISTT
NewOpenAISTT creates an OpenAI Whisper STT client. audioData passed to Transcribe may be MP3, MP4, MPEG, MPGA, M4A, WAV, or WebM.
type OpenAISTTOption ¶
type OpenAISTTOption func(*OpenAISTT)
OpenAISTTOption configures an OpenAISTT client.
func WithSTTBaseURL ¶
func WithSTTBaseURL(url string) OpenAISTTOption
func WithSTTHTTPClient ¶
func WithSTTHTTPClient(hc *http.Client) OpenAISTTOption
func WithSTTLanguage ¶
func WithSTTLanguage(lang string) OpenAISTTOption
func WithSTTModel ¶
func WithSTTModel(model string) OpenAISTTOption
type OpenAITTS ¶
type OpenAITTS struct {
// contains filtered or unexported fields
}
OpenAITTS generates speech using the OpenAI TTS API.
func NewOpenAITTS ¶
func NewOpenAITTS(apiKey string, opts ...OpenAITTSOption) *OpenAITTS
NewOpenAITTS creates an OpenAI TTS client. Supported models: tts-1, tts-1-hd. Voices: alloy, echo, fable, onyx, nova, shimmer.
func (*OpenAITTS) GenerateAudio ¶
func (*OpenAITTS) ListVoices ¶
type OpenAITTSOption ¶
type OpenAITTSOption func(*OpenAITTS)
OpenAITTSOption configures an OpenAITTS client.
func WithTTSBaseURL ¶
func WithTTSBaseURL(url string) OpenAITTSOption
func WithTTSFormat ¶
func WithTTSFormat(fmt string) OpenAITTSOption
func WithTTSHTTPClient ¶
func WithTTSHTTPClient(hc *http.Client) OpenAITTSOption
func WithTTSModel ¶
func WithTTSModel(model string) OpenAITTSOption
func WithTTSVoice ¶
func WithTTSVoice(voice string) OpenAITTSOption