Two SDKs in one day. The LeanVox Node.js/TypeScript SDK is live.
npm install leanvox
import { Leanvox } from 'leanvox';
const client = new Leanvox();
const result = await client.generate({ text: 'Hello from Node!' });
console.log(result.audioUrl);
Three lines. Full TypeScript types. Zero runtime dependencies.
Why a Node.js SDK?
Our Python SDK launched this morning and the response was clear: developers want first-class support in their stack. If you're building with Next.js, Express, Fastify, or Deno — this is for you.
What You Get
Generate speech
const result = await client.generate({
text: 'Welcome to the future of voice.',
model: 'pro',
voice: 'af_heart',
speed: 1.1,
});
console.log(result.audioUrl);
Stream audio in real-time
const stream = await client.stream({ text: 'This streams in real-time...' });
for await (const chunk of stream) {
process.stdout.write(chunk);
}
Multi-speaker dialogue
const episode = await client.dialogue({
model: 'pro',
lines: [
{ text: 'Welcome to the show!', voice: 'emma' },
{ text: 'Great to be here.', voice: 'james' },
],
gapMs: 400,
});
Voice cloning
import { readFileSync } from 'fs';
const voice = await client.voices.clone({
name: 'My Voice',
audio: readFileSync('sample.wav'),
});
await client.voices.unlock(voice.voiceId);
const result = await client.generate({
text: 'This is my cloned voice!',
voice: voice.voiceId,
});
Voice design from prompt
const narrator = await client.voices.design({
name: 'Epic Narrator',
prompt: 'Deep, warm male voice with gravitas',
});
Built for TypeScript
This isn't a JavaScript SDK with types bolted on. It's TypeScript-first:
- Full type inference — every response is typed, IDE autocompletion everywhere
- ESM + CJS — works in any Node.js project, bundler, or serverless runtime
-
Zero runtime dependencies — uses native
fetch(Node 18+) - Async/await — no callbacks, no promise chains
-
Streaming via async iterators —
for awaitjust works - Auto-retry — exponential backoff on 5xx, respects rate limits
Both SDKs, One Package Name
Same package name, same API design philosophy, same 3-line quickstart.
Get Started
npm install leanvox
import { Leanvox } from 'leanvox';
const client = new Leanvox();
const result = await client.generate({ text: "Let's build something amazing." });
console.log(result.audioUrl);
Three lines. Now go build something that talks.
→ GitHub · npm · Get your API key
Originally published at leanvox.com/blog
Top comments (0)