Gandr TTS from Python.
The official package. Zero dependencies, region failover built in, one constructor line.
The whole integration
Install and call. Keep the key on the server.
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 package | pip install gandr |
| A key | Pass your gnd_... key to Gandr() |
| Python | 3.9 or newer |
| Dependencies | None |
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.