Install
Add VoiceAI SDK to a Node or Bun project, and the vendor SDK for the three providers that need one.
VoiceAI SDK is one package. Every provider adapter ships inside it under its own subpath, so voiceai-sdk/deepgram and voiceai-sdk/elevenlabs need nothing else installed.
Install the package
npm install voiceai-sdkpnpm add voiceai-sdkyarn add voiceai-sdkbun add voiceai-sdkThe package is ESM only and needs Node 22 or later, or Bun. The examples in these docs use await using, which Node runs natively from Node 24. On Node 22, run them with npx tsx.
Provider packages
Most adapters call the provider's HTTP or WebSocket API directly. Three wrap the vendor's own SDK, which you install next to voiceai-sdk:
| Provider | Extra package | Credentials |
|---|---|---|
| Google Cloud | @google-cloud/speech, @google-cloud/text-to-speech | GOOGLE_APPLICATION_CREDENTIALS |
| Azure Speech | microsoft-cognitiveservices-speech-sdk | AZURE_SPEECH_KEY, AZURE_SPEECH_REGION |
| AWS | @aws-sdk/client-transcribe-streaming, @aws-sdk/client-polly | AWS credentials, AWS_REGION |
| Local | None. Needs whisper-cli and piper on PATH | None |
| Every other provider | None | One API key, such as DEEPGRAM_API_KEY |
For example, to use Azure Speech:
npm install voiceai-sdk microsoft-cognitiveservices-speech-sdkpnpm add voiceai-sdk microsoft-cognitiveservices-speech-sdkyarn add voiceai-sdk microsoft-cognitiveservices-speech-sdkbun add voiceai-sdk microsoft-cognitiveservices-speech-sdkSet your keys
Each adapter reads its key from the environment, or from the options you pass to its factory. Keep keys on the server. A browser bundle that imports a provider adapter would ship the key to every visitor.
# .env
DEEPGRAM_API_KEY=dg_...
ELEVENLABS_API_KEY=sk_...Check your setup
doctor checks your Node version, which provider keys it can see, and whether the local binaries are installed.
npx voiceai-sdk doctorIt prints one line per provider and exits non-zero if a provider you configured can't connect.
Next steps
- Quickstart: run a session in memory, then on your machine.
- Choose a provider: which one fits your app.