{
  "id": 15077214,
  "title": "Build a Real-Time Voice Translation App",
  "url": "https://urgent.news/2026/10/17/build-a-real-time-voice-translation-app",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-17T00:16:02.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/voice_developer/build-a-real-time-voice-translation-app-3l55"
  },
  "original_language": "en",
  "account": "Creating a real-time voice translation app may seem like a futuristic endeavor, but with today's cloud APIs, it is entirely feasible for a side project. This article outlines the entire process, from capturing audio to synthesizing speech in the target language. The example is language-agnostic, using Python for the backend and JavaScript for the frontend, and leveraging several reliable services. ElevenLabs is the key player, offering top-notch text-to-speech (TTS) and voice-cloning features. You can test their free tier at https://try.elevenlabs.io/kr07zfuqn1bp.\n\nLatency is crucial when building language-learning apps, travel chatbots, or customer support tools. Delays of 2 seconds are acceptable, while 5 seconds become noticeable. To achieve fast processing, we need: fast speech-to-text (STT) with a response time of around 1 second per sentence, quick translation within 200-400 milliseconds, and low-latency TTS that delivers the synthesized voice within 1 second. This guide assumes you have API keys for an STT provider (Google Cloud Speech-to-Text, Azure Speech, or Whisper) and a translation service (Google Translate, DeepL, or Microsoft Translator). ElevenLabs will handle the TTS portion.\n\nThe high-level architecture comprises four components: the browser (JavaScript), a Node.js/Flask API, and ElevenLabs TTS. The browser captures microphone audio via the Web Audio API and streams it to the backend through a WebSocket. The backend forwards audio chunks to the STT service, then to the translation service, and finally to ElevenLabs for synthesis. ElevenLabs returns an MP3 or raw PCM stream that the browser plays back.\n\nThe front-end JavaScript snippet records microphone input and streams it to the server using WebSocket. It utilizes the MediaRecorder API for simplicity. The code sends audio chunks as binary data to the WebSocket, which then sends them to the backend. After the buffer reaches a threshold (250ms chunks in this example) or detects silence, the backend sends the audio to the STT API, proceeds with translation, and receives the synthesized speech from ElevenLabs. The backend handles asynchronous tasks, such as connecting to the STT and translation APIs, using aiohttp for async HTTP requests. It also includes functions for transcribing audio, translating text, and sending the translated text to ElevenLabs for TTS.",
  "summary": "Getting Started with a Real‑Time Voice Translation App Building a real‑time voice translation app feels like science‑fiction, but with today’s cloud APIs it’s a very achievable side‑project. In this article we’ll walk through the whole stack: capturing audio, transcribing it, translating the text, and finally turning the translated text back into speech. We’ll keep the example language‑agnostic…",
  "key_points": [
    "Real-time voice translation app possible with cloud APIs",
    "ElevenLabs provides top-notch TTS and voice-cloning features",
    "Latency crucial: 1 sec STT, 200-400 ms translation, 1 sec TTS"
  ],
  "editors_take": "Integrating specialized cloud APIs into a single pipeline transforms complex speech synthesis into an accessible side project for developers building low-latency tools for travel or customer support.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}