Real-time Speech-To-Text for developers
Integrates with
What is router.audio?
Every provider has their own SDKs, response formats and audio format limitations. router.audio is a light-weight service providing a single endpoint that proxies to different STT providers, built on top of their WebSockets directly to ensure reliability and scalability.
Deploy with different providers to different languages without changing your code
Global Anycast infrastructure with ultra-low routing latency
Bring your own API key and use router.audio for free
Compare real-time STT APIs
Select multiple providers and speak into your mic to see how they transcribe your speech side by side in real time. The full range of model and language support for providers can be found in our Language Checker .
How to use
import asyncio
import websockets
import json
import sounddevice as sd
from urllib.parse import urlencode
async def transcribe():
params = {
"provider": "deepgram",
"encoding": "pcm_s16le",
"sample_rate": "16000",
}
async with websockets.connect(
f"wss://api.router.audio/v1/listen?{urlencode(params)}",
additional_headers={"x-api-key": "<Your API key>"}
) as ws:
loop = asyncio.get_event_loop()
mic = sd.RawInputStream(samplerate=16000, channels=1, dtype="int16")
mic.start()
async def send_audio():
while True:
data, _ = await loop.run_in_executor(None, mic.read, 4000)
await ws.send(bytes(data))
async def recv_text():
async for msg in ws:
data = json.loads(msg)
if data.get("type") == "transcript":
print(data["transcript"])
await asyncio.gather(send_audio(), recv_text())
asyncio.run(transcribe())Get started in minutes
Get API keys from your API providers, open a WebSocket, and start streaming audio to any provider with a single endpoint. No SDKs, no per-provider integrations.
Tool
Language Checker
Search for any language and see which APIs and models support it.
Try the language checker →Join our small community
Have questions, feedback or hate mail? Come hang out on the Discord.
Join Discord