screencastgen

Remote TTS

HTTP proxy TTS backend that delegates synthesis to a GPU inference server.

Source: screencastgen/providers/tts/remote_tts.py


Overview

Implements the TTSBackend protocol by proxying requests to a GPU inference server over HTTP. This is the TTS piece of the CPU/GPU split architecture.

At startup it queries GET /health to discover:

Those values are then used by local chunking and output handling.


Class: RemoteTTS

Properties

Property Source Description
max_chunk_bytes Server /health Remote backend chunk limit
output_format Server /health Remote backend output format

Constructor

RemoteTTS(
    server_url="http://localhost:8100",
    language="en-US",
    timeout=300,
    ref_audio_path=None,
    ref_text=None,
)

On init, the backend:

Methods

Method Description
synthesize(text, output_path) Send one request to /synthesize and write returned audio bytes

Request Formats

Without voice cloning

Sends application/json:

With voice cloning

Sends multipart/form-data:

The server is responsible for batching compatible requests.


BackendSpec

Field Value
Name remote
Contexts cli
Capabilities remote, server_managed_reference

Extra Args

Arg Type Default Description
--tts-server-url str http://localhost:8100 GPU server URL

Dependencies

Remote TTS
├── urllib.request      (HTTP)
├── TTS Base        (BackendSpec, BackendArg)
└──▶ registered in TTS Registry
     └──▶ talks to Inference Server

See Also