Documentation
¶
Overview ¶
Package asyncai is a streaming text-to-speech service backed by Async's TTS WebSocket. For each sentence it opens a connection, sends an init message and the transcript, and streams the raw PCM audio chunks downstream.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// APIKey is the Async API key. Required.
APIKey string `validate:"required"`
// Voice is the voice id (UUID) to synthesize with. Required.
Voice string `validate:"required"`
// URL overrides the TTS WebSocket endpoint; empty uses the hosted endpoint.
URL string
// Version sets the API version; empty uses a default.
Version string
// Model is the Async model id; empty uses a default.
Model string
// Language is the synthesis language code; empty uses "en".
Language string
// SampleRate is the PCM rate requested and emitted downstream; 0 uses 24 kHz.
SampleRate int
}
Config configures the Async TTS service.
Click to show internal directories.
Click to hide internal directories.