Skip to content

Gandr TTS from Python.

The official package. Zero dependencies, region failover built in, one constructor line.

Ask Claude CodeAsk ChatGPT

The whole integration

Install and call. Keep the key on the server.

Integration
pip install gandr

from gandr import Gandr
g = Gandr("gnd_...")
open("hello.wav", "wb").write(g.say("Hello from Gandr."))

Python 3.9 or newer, no other packages. say returns a WAV file, and if one region cannot be reached the client tries the next. To play audio while it renders, use /v1/tts/sse or the WebSocket from the docs.

What it needs

What it takes

One packagepip install gandr
A keyPass your gnd_... key to Gandr()
Python3.9 or newer
DependenciesNone

Why the package exists

The client is the surface a Python team meets first. Zero dependencies means one install and no version fights, and if one region cannot be reached the client tries the next.

The constructor takes your key. say returns a WAV file, voices lists the stock voices, and usage reads what the key has spent.

What the flat stream changes

Python backs a lot of batch work: narration, dubbing pipelines, agent loops. On a per-character meter those jobs bill by volume; on a flat stream the bill is the stream, and long render jobs stop being a cost line to avoid.

  • One stream carries batch and streaming work alike
  • No per-character meter on long narration jobs
  • Region failover is built in, not bolted on

Notes

Do I need to install anything besides gandr?

No. The package is zero dependency. Python 3.9 or newer is the only requirement.

Can I stream audio as it renders?

Yes, over /v1/tts/sse or the WebSocket. The single-file client at gandr.ai/sdk/gandr_tts.py wraps both. The package returns whole WAV files.

A key and one stream, and your Python app speaks.

Get a key

Full API reference , gandr.ai/docs