VoiceRouter SDK

One interface. Every speech-to-text API.

Fully typed in TypeScript. Swap providers without touching your code. Do real comparisons. Test fast, ship faster.

pnpm add voice-router-dev
example.tstypescript
import { createRouter } from "voice-router-dev";
const router = createRouter({
provider: "gladia",
apiKey: process.env.TRANSCRIPTION_API_KEY,
});
const transcript = await router.transcribe({
audio: audioBuffer,
language: "en",
});

Transcription Provider Agnostic

Any transcription service, same code

Plug in Gladia, Deepgram, Assembly AI, OpenAI Whisper, or any transcription provider. Compare accuracy, latency, and cost—switch with a config change.

Change Transcription Provider

Same code, any transcription service. Change one config value to switch between Gladia, Deepgram, Assembly AI, and more.

router.tstypescript
import { createRouter } from "voice-router-dev";
// Switch provider with one line
const router = createRouter({
provider: "gladia", // or "deepgram", "assemblyai", etc.
apiKey: process.env.TRANSCRIPTION_API_KEY,
});
// Same API, any provider
const transcript = await router.transcribe({
audio: audioBuffer,
language: "en",
});
Switch transcription providertypescript
// Switch transcription provider
const router = createRouter({
provider: "assemblyai", // Was: "gladia"
apiKey: process.env.ASSEMBLYAI_API_KEY,
});
// Same interface, different provider
const transcript = await router.transcribe({
audio: audioBuffer,
options: {
punctuate: true,
diarize: true,
},
});

Unified Webhook Handling

Handle transcription callbacks from any provider with one router. Normalized payloads, consistent event types.

webhooks.tstypescript
import { WebhookRouter } from "voice-router-dev";
const webhooks = new WebhookRouter();
// Handle transcription callbacks from any provider
webhooks.on("transcription.completed", (event) => {
// Normalized payload—same structure regardless of provider
console.log(event.transcript);
console.log(event.provider); // "gladia" | "deepgram" | "assemblyai"
});
// In your API route
export async function POST(req: Request) {
return webhooks.handle(req);
}

Supported Providers

One unified API for all major transcription services.

Why VoiceRouter?

100% Open Source

Not a service—just an SDK. All code is public, auditable, and MIT licensed. You own your integration.

Always Up-to-Date

Auto-generated daily from provider OpenAPI specs. When providers update, so does the SDK.

Try Multiple Platforms

Evaluate providers side-by-side without rebuilding your integration each time.

Find Your Best Config

A/B test transcription services to optimize for quality, speed, or cost.

Instant Failover

Provider down? Switch to a backup in seconds—no code changes, no downtime for your users.

Unified Webhooks

Handle transcription callbacks from any provider with one router. Normalized payloads, consistent event types.