Skip to content

Gandr TTS from Node.

The official package for Node 18 and newer. Zero dependencies, same surface as the Python SDK.

Ask Claude CodeAsk ChatGPT

The whole integration

Install and call. Keep the key on the server.

Integration
npm install gandr

// speak.mjs, run with: node speak.mjs
import { Gandr } from 'gandr';
import { writeFileSync } from 'node:fs';

const g = new Gandr('gnd_...');
writeFileSync('hello.wav', await g.say('Hello from Gandr.'));

Node 18 or newer, no other packages. say returns a WAV file, and if one region cannot be reached the client tries the next.

What it needs

What it takes

One packagenpm install gandr
A keyPass your gnd_... key to new Gandr()
Node18 or newer
DependenciesNone

Node is where the servers live

Most of the apps that want speech run on Node. The package keeps the key on the server, never in the browser bundle, and has the same say, voices and usage calls as the Python SDK, so a team that ships both keeps one mental model.

Node 18 or newer, no other packages. If one region cannot be reached, the client tries the next. To play audio while it renders, use /v1/tts/sse or the WebSocket.

What the flat stream changes

A Node service often speaks a lot: voice agents, notifications, live narration. On a per-character meter every spoken word is a billed character; on a flat stream the service talks as much as its users need and nothing is counted.

  • One stream carries a whole server, not one session
  • No per-character meter on high-volume voice
  • The key stays server-side, out of the browser

Notes

Is the Node package the same API as the Python one?

Yes. Same constructor shape, same say, voices and usage calls, same voice ids. A team that ships both keeps one mental model.

Node version is required?

Node 18 or newer. No other packages or build steps.

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

Get a key

Full API reference , gandr.ai/docs