Skip to main content

gandr

Official Python & JavaScript clients for the Gandr TTS API, text to speech built for voice agents.

  • Audio streams back as it is generated, so playback can start before the whole clip has rendered
  • WER 1.982% on a 1,088-line set, the human recordings score 2.171% on the same scorer
  • $10 a month for one million tokens (one token is one character), or unlimited, unmetered stream plans from $150/mo (annual)
  • Every render watermarked (imperceptible, detectable)
  • Numbers, dates, addresses, and order IDs read back correctly

Install

pip install gandr        # Python 3.9+, zero dependencies
npm install gandr        # Node 18+, zero dependencies

First call (under a minute)

Python

from gandr import Gandr

g = Gandr("gnd_...")  # your API key, https://gandr.ai
audio = g.say("Your table for two is confirmed for Thursday at seven.")
open("confirmation.wav", "wb").write(audio)

JavaScript

import { Gandr } from "gandr";

const g = new Gandr("gnd_...");
const wav = await g.say("Your table for two is confirmed for Thursday at seven.");
// wav is a Uint8Array of a WAV file

Options

g.say(
    "Order number 4-2-7-1 ships on March 3rd.",
    voice="gandr-jenny",        # ava, dane, jenny, leo, lewis, mia
    sample_rate=8000,           # 8000-48000, resampled server-side (telephony: 8000)
    temperature=0.9,            # 0.1-1.2, pitch range / melody
    cfg_weight=0.4,             # 0.2-1.0, pacing (lower = more spacious)
    speed=1.1,                  # 0.6-1.5
    pronunciation=[{"text": "Nguyen", "pronunciation": "win"}],
)

Omit a dial and you get the tuned default, per-voice temperature tuning included.

Voices

gandr-ava gandr-leo
gandr-dane gandr-lewis
gandr-jenny gandr-mia

g.voices() returns the live catalog.

Retries

The client moves to the next endpoint when one is unreachable. A real answer, including an error, is never retried elsewhere, so you always see the response you actually got.

Errors

from gandr import Gandr, GandrError

try:
    g.say("...")
except GandrError as e:
    e.status    # 401 invalid key · 402 quota spent · 400 bad input · 429 concurrency
    e.payload   # the API's JSON, with a hint field

Honest limits

  • One request carries up to 2,000 characters, split longer text at sentence boundaries.
  • The fleet runs always-on, so the numbers above are what you get: no cold-start lottery on the demo or the API. Overflow traffic spills to a fallback lane that can take longer on its first request.
  • The streaming WebSocket lane (wss://tts.gandr.ai/ws) is what voice agents should use, first audio byte in the numbers above. This SDK's say() returns the complete file, which suits batch and IVR work.

Links

Release files for gandr 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gandr 0.1.1
File Size Uploaded
gandr-0.1.1.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gandr 0.1.1
File Interpreter ABI Platform
gandr-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / gandr-0.1.1.tar.gz

Download URL gandr-0.1.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e7911f473e47843301577b96192312fec4736423fd0b7ed819364f855c96269d
BLAKE2b-256 checksum
How to use checksums
d45d6ad47ac90f3a00ca1bcb4bc2374893621d40fa2ef5af240301e5efd7a215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / gandr-0.1.1-py3-none-any.whl

Download URL gandr-0.1.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36cf9c188d2d6a903de0a78968d910e7dae34b9fcb0904489401326f1ad9adb5
BLAKE2b-256 checksum
How to use checksums
8a963c09bfdb61a3baca81bf5beff81ce12ce9d9f42350b0379fc96ff030e15e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page