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

Install

Initialize the client

Get an SLNG key from app.slng.ai, then construct the client:
The apiKey option defaults to process.env.SLNG_API_KEY. Pass an explicit string to override.

Text-to-speech

Speech-to-text

Streaming over WebSocket

For long passages of text-to-speech or live transcription, use the streaming client:
See WebSockets for the full message schema.

Discover models