Skip to content
Introducing VoiceAI SDK 1.0

Give your agent a voice.

Add real-time voice to your app with one import. Transcripts, voices, and audio across 12 cloud providers, Whisper, Piper, and Mock.

Read the docs

Install

bun add voiceai-sdk

One package, every adapter included

Create

await using call = await createSession(openai())

Closed when the scope exits

Speak

await call.say`How can I help?`

Speech and transcripts on one session

Local, cloud, or in-memory.

Develop on your machine with Whisper and Piper, test with scripted audio, ship to OpenAI, Deepgram, ElevenLabs, Cartesia, AssemblyAI and more. The API stays the same. See how they benchmark.

Swap the adapter, keep the code.

Every adapter passes the same conformance suite. Moving providers is an import change, not a rewrite.

your codeunchangedadapterOpenAI Realtime

Transcribe speech

Streaming speech-to-text with partial and final transcripts, word timings and timeouts. Silence comes back as ok: false, not a throw.

final · ok: true

Speak in any voice

Stream text-to-speech in the voices your provider offers. Audio starts playing before the reply is finished.

your textvoiceaudiocaller

Control the conversation

Connect, reconnect by id, let callers interrupt, pause or end a session. Each adapter declares what it supports.

transcript
connectedlisteninginterruptedspeakingended

Tests run in-process.

mock() keeps the voice session inside your test process. No microphone, no network, nothing to pay for.

  • The same API as the cloud adapters
  • No API key and no network in CI
  • Scripted audio, transcripts and voices, all in memory
your test processnetwork3 pass · 0 fail

Start in one install.

Read the docs