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. First audio byte in 146 ms over the open internet, 116 ms p50 first audio, server side warm
  • 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 as {"voices": [...]}.

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 streaming WebSocket lane (wss://tts.gandr.ai/ws) is what voice agents should use. This SDK's say() returns the complete file, which suits batch and IVR work.

Metadata

Release files for gandr 0.1.3

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.3
File Size Uploaded Provenance Actions
gandr-0.1.3.tar.gz 5.5 kB Without provenance Details for gandr-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 11.4 kB

Release files / gandr-0.1.3.tar.gz

Download URL gandr-0.1.3.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f24763896880ac585a165273ee6e61854f0e7050958dc9517dabad3f8be1bb0d
BLAKE2b-256 checksum
How to use checksums
4ec622d99c408c73ea25e21a4089da0d8cb2138d9951266593074afd6ef56799
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL gandr-0.1.3-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c33e590717243b39863814953ed075182e75b2f7522e0082f5e86d97cc5ce0d
BLAKE2b-256 checksum
How to use checksums
579f722a0d1e1598d672eae04a677a1bf0e3d20faa795a36401a96fcd95c047b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for gandr 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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