Documentation
¶
Index ¶
- Constants
- func AddContextHeaders(headers http.Header)
- func CreateAccessToken(apiKey, apiSecret string, ttl time.Duration) (string, error)
- func InferenceHeaders() http.Header
- func SetContextHeadersProvider(provider func() map[string]string) func()
- type APIConnectOptions
- type FallbackModel
- type STT
- func (s *STT) Capabilities() stt.STTCapabilities
- 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 WithSTTConnectOptions(options APIConnectOptions) STTOption
- func WithSTTEncoding(encoding string) STTOption
- func WithSTTExtraKwargs(extra map[string]any) STTOption
- func WithSTTFallbackModels(models ...FallbackModel) STTOption
- func WithSTTLanguage(language string) STTOption
- func WithSTTModel(model string) STTOption
- func WithSTTSampleRate(sampleRate int) STTOption
- type TTS
- func (t *TTS) Capabilities() tts.TTSCapabilities
- 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 WithSentenceTokenizer(tokenizer tokenize.SentenceTokenizer) TTSOption
- func WithTTSConnectOptions(options APIConnectOptions) TTSOption
- func WithTTSEncoding(encoding string) TTSOption
- func WithTTSExtraKwargs(extra map[string]any) TTSOption
- func WithTTSFallbackModels(models ...FallbackModel) TTSOption
- func WithTTSLanguage(language string) TTSOption
- func WithTTSModel(model string) TTSOption
- func WithTTSSampleRate(sampleRate int) TTSOption
- func WithTTSVoice(voice string) TTSOption
Constants ¶
View Source
const ( InferenceAccessTokenTTL = 10 * time.Minute HeaderUserAgent = "User-Agent" HeaderRoomID = "X-LiveKit-Room-ID" HeaderJobID = "X-LiveKit-Job-ID" HeaderInferenceProvider = "X-LiveKit-Inference-Provider" HeaderInferencePriority = "X-LiveKit-Inference-Priority" )
Variables ¶
This section is empty.
Functions ¶
func AddContextHeaders ¶ added in v0.0.15
func CreateAccessToken ¶
func InferenceHeaders ¶ added in v0.0.15
func SetContextHeadersProvider ¶ added in v0.0.15
Types ¶
type APIConnectOptions ¶ added in v0.0.15
type APIConnectOptions = llm.APIConnectOptions
type FallbackModel ¶
type STT ¶
type STT struct {
// contains filtered or unexported fields
}
func (*STT) Capabilities ¶
func (s *STT) Capabilities() stt.STTCapabilities
func (*STT) Recognize ¶
func (s *STT) Recognize(ctx context.Context, frames []*model.AudioFrame, language string) (*stt.SpeechEvent, error)
func (*STT) UpdateOptions ¶ added in v0.0.15
type STTOption ¶ added in v0.0.15
type STTOption func(*STT)
func WithSTTConnectOptions ¶ added in v0.0.15
func WithSTTConnectOptions(options APIConnectOptions) STTOption
func WithSTTEncoding ¶ added in v0.0.15
func WithSTTExtraKwargs ¶ added in v0.0.15
func WithSTTFallbackModels ¶ added in v0.0.15
func WithSTTFallbackModels(models ...FallbackModel) STTOption
func WithSTTLanguage ¶ added in v0.0.15
func WithSTTModel ¶ added in v0.0.15
func WithSTTSampleRate ¶ added in v0.0.15
type TTS ¶
type TTS struct {
// contains filtered or unexported fields
}
func (*TTS) Capabilities ¶
func (t *TTS) Capabilities() tts.TTSCapabilities
func (*TTS) NumChannels ¶
func (*TTS) SampleRate ¶
func (*TTS) Synthesize ¶
func (*TTS) UpdateOptions ¶ added in v0.0.15
type TTSOption ¶ added in v0.0.15
type TTSOption func(*TTS)
func WithSentenceTokenizer ¶ added in v0.0.15
func WithSentenceTokenizer(tokenizer tokenize.SentenceTokenizer) TTSOption
func WithTTSConnectOptions ¶ added in v0.0.15
func WithTTSConnectOptions(options APIConnectOptions) TTSOption
func WithTTSEncoding ¶ added in v0.0.15
func WithTTSExtraKwargs ¶ added in v0.0.15
func WithTTSFallbackModels ¶ added in v0.0.15
func WithTTSFallbackModels(models ...FallbackModel) TTSOption
func WithTTSLanguage ¶ added in v0.0.15
func WithTTSModel ¶ added in v0.0.15
func WithTTSSampleRate ¶ added in v0.0.15
func WithTTSVoice ¶ added in v0.0.15
Click to show internal directories.
Click to hide internal directories.