Skip to content

Gandr TTS with the AI SDK.

The published AI SDK integration for JS. One install, one factory, and the framework's own speech call.

Ask Claude CodeAsk ChatGPT

The whole integration

Install both packages, create, generate.

Integration
npm install gandr-ai-sdk ai

import { createGandr } from 'gandr-ai-sdk';
const gandr = createGandr();       // key from GANDR_API_KEY
const audio = await gandr.generateSpeech('Hello from Gandr.');

The integration returns audio in the AI SDK shape, so it drops into existing AI SDK apps. Node 18 or newer.

What it needs

What it takes

Two packagesnpm install gandr-ai-sdk ai
A keyGANDR_API_KEY in the environment
Node18 or newer
AI SDKAny recent version

The AI SDK shape, kept

The AI SDK is the common surface for JS AI apps. The integration returns audio in the AI SDK shape, so an app that already uses the framework can add speech without learning a second API.

One factory, createGandr(), reads the key from GANDR_API_KEY and returns generateSpeech, the framework's own speech call. Node 18 or newer.

What the flat stream changes

An AI SDK app that speaks every assistant reply burns characters fast on a per-character meter. On a flat stream the app talks as much as its users need and nothing is counted.

  • Returns audio in the AI SDK shape, no adapter layer
  • One stream carries a whole app, not one conversation
  • No per-character meter on assistant speech

Notes

Do I need to install the AI SDK separately?

Yes. The install is two packages: gandr-ai-sdk and the ai framework itself, both via npm.

What Node version is required?

Node 18 or newer, the same floor as the rest of the AI SDK.

A key and one stream, and your AI SDK app speaks.

Get a key

Full API reference , gandr.ai/docs