Documentation
¶
Overview ¶
Package piper is a text-to-speech provider for a local Piper HTTP server (python -m piper.http_server). The server accepts the text to speak as the request body and returns a WAV file; this provider strips the WAV header and streams the raw PCM samples downstream.
Piper's sample rate depends on the voice the server was launched with (16 kHz for "low" voices, 22.05 kHz for "medium"). Set SampleRate to match the voice; the pipeline resamples to the output rate from there.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// BaseURL is the Piper HTTP server's synthesis endpoint (e.g.
// http://localhost:5000). The text to speak is POSTed as the body. Required.
BaseURL string `validate:"required,url"`
// SampleRate is the PCM rate of the configured Piper voice; 0 uses 22050.
SampleRate int
}
Config configures the Piper TTS provider.
Click to show internal directories.
Click to hide internal directories.