Theme
Developer quickstart
Generate speech with the Python or TypeScript SDK.
Official packages: Python on PyPI and TypeScript on npm.
Create a key in the VoiceLab app with TTS Access and Voices Read, then export it:
bash
export VOICELAB_API_KEY=your_api_keyChoose a language
Choose your language
Generate your first audio file
Install the npm package
Terminalnpm install @voicelab/sdkGenerate speech
TypeScriptimport { writeFile } from "node:fs/promises"; import { VoiceLab } from "@voicelab/sdk"; const voiceLab = new VoiceLab({ apiKey: process.env.VOICELAB_API_KEY!, }); const speech = await voiceLab.tts.synthesize({ text: "Hello from VoiceLab.", language: "en", voiceId: "voice_01J9NEUTRAL0000000000000001", }); await writeFile("speech.wav", new Uint8Array(speech.audio));
Choose a voice_... ID from the voice catalog for your account. Use the HTTP reference for operations your SDK version does not expose.