Documentation
¶
Overview ¶
Package ttsclient renders speech through an OpenAI-compatible `POST /v1/audio/speech` server (VoiceStudio, an OpenAI-shaped proxy, any engine that speaks that contract) and writes the encoded audio to a file.
It is the harness's `tts_endpoint` lane: the HTTP twin of the in-process Chatterbox worker, for boxes where the voice engine is a running server rather than a python script. The server owns its own GPU, so this lane takes no media lease — the same rule as any remote engine.
Index ¶
Constants ¶
const DefaultModel = "tts-1"
DefaultModel is what an OpenAI-compatible server accepts when the box configures no tts_model: every such server maps the OpenAI alias `tts-1` to its default engine (VoiceStudio 0.5.1 measured 2026-09-07: `tts-1` → 200, `default` → 400).
const DefaultVoice = "default"
DefaultVoice is the server's own default voice.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
Base string // server base URL, no trailing /v1 (e.g. http://127.0.0.1:3900)
APIKey string // optional bearer token
Model string // "" → DefaultModel
Voice string // "" → DefaultVoice
Text string // required
Language string // optional ISO 639-1 hint (VoiceStudio extra; ignored by servers that do not know it)
Format string // "" → "wav"
Out string // output file path; parent dir is created
Timeout time.Duration
Client *http.Client // nil → a client with Timeout
}
Request is one render.