xtts

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2026 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package xtts provides text-to-speech via a self-hosted Coqui XTTS streaming server (https://github.com/coqui-ai/xtts-streaming-server). The server holds the voices; this client fetches a studio speaker's embeddings once and streams raw 24 kHz PCM for each sentence.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTTS

func NewTTS(cfg Config) *tts.Base

NewTTS builds a Coqui XTTS TTS service.

Types

type Config

type Config struct {
	// BaseURL is the XTTS streaming server base (e.g. http://localhost:8000). Required.
	BaseURL string `validate:"required"`
	// Voice is the studio speaker name to synthesize with. Required.
	Voice string `validate:"required"`
	// Language is the synthesis language code; empty uses "en".
	Language string
	// SampleRate is the PCM output rate reported downstream; 0 uses 24 kHz.
	SampleRate int
}

Config configures a Coqui XTTS streaming-server TTS service.

func (Config) Validate

func (c Config) Validate() error

Validate reports whether the configuration is usable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL