Documentation
¶
Overview ¶
Package xtts provides Coqui XTTS text-to-speech via local streaming server. See https://github.com/coqui-ai/xtts-streaming-server (e.g. docker run -p 8000:80 ...).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TTSService ¶
type TTSService struct {
// contains filtered or unexported fields
}
TTSService implements services.TTSService using XTTS streaming server.
func NewTTS ¶
func NewTTS(apiKey, baseURL, voice, language string) *TTSService
NewTTS creates an XTTS TTS service. baseURL defaults to XTTS_BASE_URL env or http://localhost:8000.
func (*TTSService) Speak ¶
func (s *TTSService) Speak(ctx context.Context, text string, sampleRate int) ([]*frames.TTSAudioRawFrame, error)
Speak requests TTS from XTTS and returns TTSAudioRawFrame(s). XTTS outputs 24000 Hz.
Click to show internal directories.
Click to hide internal directories.