Skip to main content
voiceai-sdk is the official TypeScript client for the SLNG API. It runs in any runtime that supports Node 18+, including Node, Bun, and Deno.

Install

Initialize the client

Create a key at app.slng.ai, or see Create your API key, then construct the client:
The apiKey option defaults to process.env.SLNG_API_KEY. Pass an explicit string to override it.

Text to speech

Speech to text

Stream over WebSocket

For long passages of text to speech or live transcription, use the streaming client:
See WebSockets vs HTTP for when to stream and the full message schema.

Discover models