speechrouter

    Git Repo
    speech-router

    Acts as a single API gateway for speech recognition models across multiple providers with automatic failover and standardized schemas.

    About speechrouter

    SpeechRouter provides a unified gateway and single API layer for streaming speech-to-text across 12 different voice AI providers with automatic mid-stream failover.

    For the Non-Technical Reader

    Imagine having a universal travel adapter that also acts as a seamless backup generator for real-time speech recognition. If a speech-to-text provider goes down mid-sentence during a live call, SpeechRouter instantly switches to a backup provider without losing a word or repeating phrases. To the end user, your voice assistant or transcription service remains completely uninterrupted and rock-solid, regardless of vendor outages or price changes.

    For the Technical Reader

    SpeechRouter abstracts the fragmented speech infrastructure landscape behind one standardized protocol and API gateway:

    • Provider Coverage & Schema: Connects to 30+ models across 12 providers (Deepgram, Cartesia, AssemblyAI, OpenAI, Soniox, etc.) with a single normalized schema for word timings, speaker diarization, confidence scores, and language hints.
    • Mid-Stream Failover Engine: Replays buffered PCM audio into configured fallback lanes if the primary stream fails mid-utterance, utilizing duplicate-final suppression to ensure seamless text streams at the seam.
    • Streaming Protocol: Operates over a single WebSocket endpoint accepting raw binary PCM frames and pushing code-generated JSON events (such as transcript, vad.edge, and failover.triggered).
    • License & Portability: Released under Apache-2.0, allowing teams to self-host the exact same gateway code used in production cloud deployments or pass through original provider keys (BYOK) with 0% markup.

    Why It Matters

    Voice AI reliability is heavily bottlenecked by vendor uptime and protocol divergence. By introducing a unified schema and automatic failover layer, SpeechRouter mitigates single-point-of-failure risks, eliminates vendor lock-in, and gives engineering teams instant pricing and vendor mobility without rewriting client-side speech pipelines.

    The "Voice AI Space Lab" Idea

    Build an Ultra-Resilient Mission-Critical Dispatch Agent. By leveraging SpeechRouter's fallback lanes, you can route real-time audio through high-speed ultra-low-latency models (like Deepgram Flux or Cartesia) and automatically failover to secondary fallback models during network spikes or provider downtime, ensuring critical voice workflows never drop an utterance.

    Explore the project on the SpeechRouter GitHub Repository.