Gandr TTS with the AI SDK.
The published AI SDK integration for JS. One install, one factory, and the framework's own speech call.
The whole integration
Install both packages, create, generate.
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 packages | npm install gandr-ai-sdk ai |
| A key | GANDR_API_KEY in the environment |
| Node | 18 or newer |
| AI SDK | Any 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.