Duo Voice — Documentation

A complete description of the interface, features, settings, and usage scenarios.

1. Overview — What is Duo Voice

Duo Voice is a real‑time speech and system‑audio translator that runs entirely in the browser. It captures your microphone, browser tab audio (desktop only), transcribes both streams independently, synchronizes them line‑by‑line, translates them into a single target language, and optionally speaks the translated text aloud using TTS.

Duo Voice is designed as a two‑column messenger: the left side shows the original text, the right side shows the translation. Every line is paired, synchronized, and interactive — you can replay audio, edit text, or delete entire pairs. The interface adapts to narrow screens, allowing swipe‑based switching between original and translation while keeping perfect alignment.

The system supports microphone input, system audio input, translation, TTS playback, transcript saving, session control (Start, Stop, Pause, Resume), and mobile auto‑mute logic to prevent audio feedback loops. All components work together through a clean, modular pipeline: Input → ASR → Sync → Translation → TTS → UI.

Duo Voice is built for language learning, communication, meetings, accessibility, and real‑time bilingual interaction — without installing anything. It uses WebAudio, WebSocket streaming, and a custom translation model pipeline to deliver fast, stable, synchronized results directly in your browser.

2. Quick Start — Getting Started

Duo Voice starts working immediately in your browser — no installation, no extensions, no setup. A new session begins when you press Start, and all previous data is cleared. This section explains how to begin using the microphone, system audio, translation, and TTS.

Step 1 — Choose Languages

Before starting the session, select:

  • Microphone language — the language you will speak.
  • System audio language — the language of the audio coming from the browser tab (desktop only).
  • Translation language — the single target language for all sources.
The target translation language is locked at the start, but can be dynamically swapped using the Flip feature during the session, if available.

Step 2 — Enable Audio Sources

You can enable or disable each source independently:

  • Microphone — your voice input.
  • System audio — audio from the active browser tab.
  • Translation — creates the right column with translated text.
  • TTS — speaks translated text aloud.
All sources work in parallel and can be toggled at any moment.

Step 3 — Press Start

Pressing Start begins a new session:

  • All previous transcript data is erased.
  • Microphone and system audio begin streaming.
  • ASR starts producing synchronized lines.
  • Translation and TTS activate according to your settings.
You can pause the session at any time using Pause, and resume with Resume.

Step 4 — View Original and Translation

The interface displays two synchronized columns:

  • Left — original text (mic + system audio).
  • Right — translation.
On narrow screens, Duo Voice switches to a single-column mode with swipe-based switching.

Step 5 — Save Your Transcript

You can save the transcript at any moment using Save transcript. It includes:

  • original text
  • translation
  • timestamps
  • source tags
  • edited lines
Starting a new session erases all previous data permanently.

3. Interface Guide — Buttons and UI Elements

Duo Voice uses a clean two‑column messenger interface. The left column displays the original text (microphone + system audio), and the right column displays the translation. Every line is synchronized, interactive, and can be replayed, edited, or deleted. This section explains all UI elements and controls.

Main Controls

  • Start — begins a new session and clears all previous data.
  • Stop — ends the session; transcript remains visible until the next Start.
  • Pause — temporarily stops audio processing.
  • Resume — continues processing from the same point.
  • Save transcript — saves all current session data (original, translation, timestamps).

Audio Source Toggles

  • Microphone — enables or disables voice input.
  • System Audio — captures audio from the browser tab (desktop only).
  • Translation — enables translation into the selected target language.
  • TTS — speaks translated text aloud in queue order.

Language Selectors

  • Mic Language — recognition language for microphone input.
  • System Language — recognition language for system audio.
  • Translation Language — the single target language for all sources (chosen before Start).

Flip — Instant Language Swap

The Flip button instantly swaps the microphone language and the translation direction. It works in real time and does not interrupt the session. All recognition, translation, and TTS continue seamlessly with the new language configuration.

  • Mic Language ↔ Translation Language are swapped instantly.
  • Synchronization of lines is preserved — no data is lost.
  • Flip works only when system audio is turned off.
  • Flip works during active streaming without restarting the session.
  • Mobile version also supports Flip (mic only).

Flip is useful for bilingual conversations, switching speaker roles, or practicing both directions of translation.

Two‑Column Layout

The interface displays synchronized pairs of lines:

  • Left column — original text (mic + system audio).
  • Right column — translation.

Each line is color‑coded:

  • Blue — microphone input.
  • Gray — system audio input.

Interactive Line Controls

Clicking any line activates it and reveals additional actions:

  • Play — replay original audio or TTS translation depending on the selected side.
  • Edit — modify the text of the selected line.
  • Copy — copy the text to clipboard.
  • Delete — remove the entire pair (original + translation).

Narrow Screen Mode (Swipe Mode)

When the browser window becomes narrow, Duo Voice switches to a single‑column mode:

  • Only one side is shown at a time (original or translation).
  • Line synchronization is fully preserved.
  • Swipe or tap switches between original and translation.
  • All interactive controls remain available.

Status Indicators

  • Standby — the system is active and ready.
  • Idle — visual indicator showing that Duo Voice is waiting for input.
4. Settings — Configuration Options

Duo Voice provides several configuration options that control how audio is captured, how speech is recognized, how translation works, and how the interface behaves. All settings can be adjusted before starting a session, and most can be toggled at any time.

Language Settings

  • Mic Language — the recognition language for microphone input. This determines how your spoken words are transcribed.
  • System Language — the recognition language for system audio (desktop only). This determines how audio from the browser tab is transcribed.
  • Translation Language — the single target language for all translated text. The target translation language is locked at the start, but can be dynamically swapped using the Flip feature during the session, if available..

Audio Source Toggles

  • micEnabled — enables or disables microphone input. Can be toggled at any moment during the session.
  • sysEnabled — enables or disables system audio capture. Available only on desktop browsers.
  • trEnabled — enables translation for all recognized text. When disabled, only the original column is shown.
  • soundEnabled — enables Text‑to‑Speech (TTS) playback of translated text. On desktop, headphones are recommended when the microphone is active.

Flip — Instant Language Swap

The Flip button instantly swaps the microphone language and the translation direction. It works in real time and does not interrupt the session. All recognition, translation, and TTS continue seamlessly with the new language configuration.

  • Mic Language ↔ Translation Language are swapped instantly.
  • No restart required — the session continues without interruption.
  • Line synchronization is preserved; no data is lost.
  • Flip works only when system audio is turned off..
  • Flip works on desktop and mobile.

Session Behavior

  • Start — begins a new session and clears all previous transcript data.
  • Pause — temporarily stops recognition and translation.
  • Resume — continues processing from the same point.
  • Stop — ends the session; data remains visible until the next Start.

Mobile‑Specific Behavior

  • autoMuteLoop — automatically mutes the microphone during TTS playback to prevent feedback loops. This replaces the need for headphones on mobile devices.
  • System audio is not available on mobile browsers.
  • The microphone is always enabled on mobile (no toggle), ensuring stable permissions.

Display & Interaction Settings

  • Swipe Mode — automatically activates when the browser window becomes narrow. Allows switching between original and translation with a swipe or tap.
  • Interactive Lines — clicking a line reveals controls: Play, Edit, Copy, Delete.
  • Line Pairing — original and translation are always synchronized and treated as a single unit.

These settings allow Duo Voice to adapt to different devices, languages, and usage scenarios, providing a flexible and intuitive real‑time translation experience.

5. Features — Duo Voice Capabilities

Duo Voice combines real‑time speech recognition, system audio capture, translation, synchronized two‑column display, and optional TTS playback. All components work together to create a seamless bilingual experience directly in the browser.

Real‑Time Speech Recognition

  • Independent ASR pipelines for microphone and system audio.
  • Partial text appears instantly and updates until the final result arrives.
  • Final text replaces partial output and is used for TTS.
  • Accurate timestamps and source tags for every line.
  • Low latency processing optimized for continuous speech.

System Audio Capture (Desktop Only)

  • Captures audio from the active browser tab.
  • Recognizes speech in any supported language.
  • Works in parallel with microphone input.
  • Does not interfere with microphone or TTS playback.

Parallel Processing

Microphone and system audio run simultaneously:

  • Each source produces its own lines.
  • Lines are synchronized into pairs with translation.
  • No collisions or mixing between sources.

Translation

  • Single target language for all sources.
  • Translation language selected before Start.
  • Works with both partial and final text; final result replaces partial.
  • Produces clean, aligned right‑column output.

Instant Flip (Real-Time Language Swap)

  • Swap microphone language and translation direction with one click.
  • Works during active streaming — no need to stop or restart.
  • Both ASR pipelines immediately switch to the new language configuration.
  • Flip works only when system audio is turned off..
  • All lines remain synchronized; no interruption or data loss.
  • Ideal for bilingual conversations, role switching, and language practice.

Text‑to‑Speech (TTS)

  • Speaks translated text aloud with natural voice.
  • Strict queue order — no interruptions.
  • Small delay until translation is ready.
  • Desktop: headphones recommended when mic is active.
  • Mobile: autoMuteLoop prevents feedback loops.

Two‑Column Synchronized Display

  • Left column: original text (mic + system audio).
  • Right column: translation.
  • Perfect line‑by‑line synchronization.
  • Color‑coded sources for clarity.

Interactive Line Controls

  • Play — replay original or translated audio.
  • Edit — modify text directly in the interface.
  • Copy — copy any line to clipboard.
  • Delete — remove the entire pair (original + translation).

Swipe Mode (Narrow Browser Window)

  • Automatic switch to single‑column layout.
  • Swipe or tap to switch between original and translation.
  • Full synchronization preserved.
  • All interactive controls remain available.

Mobile‑Optimized Behavior

  • Microphone always enabled for stable permissions.
  • System audio unavailable due to browser limitations.
  • autoMuteLoop prevents TTS → mic feedback loops.
  • Same synchronized interface and interactive controls.

Session Management

  • Start — begins a new session and clears previous data.
  • Pause — temporarily stops processing.
  • Resume — continues from the same point.
  • Stop — ends the session.
  • Standby / Idle — visual indicators of activity.

Transcript Saving

  • Save transcript at any moment.
  • Includes original, translation, timestamps, and edits.
  • New Start erases all previous data permanently.

Together, these features make Duo Voice a powerful tool for language learning, communication, accessibility, and real‑time bilingual interaction.

6. Scenarios — Real Use Cases

Duo Voice is designed for real‑time bilingual interaction. It works equally well for learning, communication, meetings, accessibility, and everyday tasks. Below are the most common scenarios where Duo Voice provides a clear advantage.

Language Learning

  • Practice speaking with instant translation and TTS feedback.
  • Listen to system audio (videos, lessons, podcasts) with synchronized translation.
  • Use Flip to switch between languages during exercises.
  • Review transcripts to track progress and correct mistakes.

Real‑Time Conversations

  • Speak in your language while Duo Voice translates for the other person.
  • Flip instantly when the other person starts speaking.
  • Use TTS to speak translated text aloud in natural voice.
  • Ideal for bilingual families, travel, or helping non‑native speakers.

Online Meetings & Calls

  • Translate system audio from video calls, webinars, or conferences.
  • Follow discussions in real time with synchronized text.
  • Use microphone translation to participate actively.
  • Save transcripts for later review or documentation.

Accessibility & Support

  • Assist users who prefer reading over listening.
  • Provide translated captions for audio content.
  • Help users with hearing or language processing difficulties.
  • Enable multilingual support in customer service scenarios.

Content Consumption

  • Translate YouTube videos, tutorials, interviews, or podcasts.
  • Use swipe mode on narrow screens for comfortable reading.
  • Replay original or translated audio for clarity.
  • Quickly switch languages using Flip for bilingual content.

Work & Productivity

  • Translate training materials, presentations, or recorded meetings.
  • Use transcripts for documentation or note‑taking.
  • Enable multilingual collaboration in teams.
  • Support cross‑border communication without external apps.

Travel & Everyday Use

  • Translate conversations with locals or service providers.
  • Understand announcements, guides, or audio instructions.
  • Practice speaking before trips using TTS feedback.
  • Use Flip to switch roles instantly during dialogue.

These scenarios demonstrate how Duo Voice adapts to different environments and needs, providing a flexible, intuitive, and powerful real‑time translation experience.

7. Architecture — System Pipeline

Duo Voice is built as a modular real‑time audio processing pipeline. Each component works independently and communicates through lightweight streaming channels. This ensures low latency, stable synchronization, and seamless parallel processing of microphone and system audio.

1. Input Layer — Audio Sources

Duo Voice receives audio from two independent sources:

  • Microphone — user speech input.
  • System Audio — audio from the active browser tab (desktop only).

Each source has its own language configuration and operates in parallel without interfering with the other.

2. Capture & Buffering — WebAudio

Audio is captured using the WebAudio API:

  • AudioWorklet processes raw PCM frames.
  • Frames are buffered and normalized.
  • Each source is streamed independently.

This design ensures stable real‑time capture even under high load.

3. Streaming Layer — WebSocket Transport

Buffered audio is sent to the backend through a persistent WebSocket connection:

  • Low latency streaming.
  • Independent channels for mic and system audio.
  • Automatic reconnection and session continuity.

4. ASR Layer — Speech Recognition

Each audio stream is transcribed by its own ASR pipeline:

  • Partial text updates in real time; final text replaces it and is used for TTS.
  • Accurate timestamps.
  • Source tags: [you] and [call, audio].
  • Independent recognition languages.

5. Sync Layer — Line Pairing

After recognition, each line is synchronized into a two‑column structure:

  • Left column — original text.
  • Right column — translation.
  • Unique IDs ensure stable pairing.
  • Parallel sources never collide.

Synchronization is preserved even in swipe mode or during rapid input.

6. Translation Layer — LLM Pipeline

All recognized text is translated into a single target language:

  • Translation language selected before Start.
  • Translates both partial and final text; final result replaces partial ASR and partial translation.
  • Produces clean, aligned output.
  • Flip instantly swaps mic ↔ translation direction.
  • Flip is unavailable when system audio is enabled.

7. TTS Layer — Audio Output

Translated text is optionally spoken aloud:

  • Queued playback (no interruptions).
  • Small delay until translation is ready.
  • Desktop: headphones recommended with mic.
  • Mobile: autoMuteLoop prevents feedback loops.

8. UI Layer — Two‑Column Messenger

The interface displays synchronized text pairs:

  • Original on the left.
  • Translation on the right.
  • Color‑coded sources.
  • Interactive controls: Play, Edit, Copy, Delete.
  • Swipe mode on narrow screens.

9. Session Layer — Control & State

  • Start — new session, clears history.
  • Pause — temporary halt.
  • Resume — continue processing.
  • Stop — end session.
  • Standby / Idle — visual indicators only.

10. Storage Layer — Transcript

  • Save transcript at any moment.
  • Includes original, translation, timestamps, edits.
  • New Start erases all previous data permanently.

This architecture ensures that Duo Voice remains fast, stable, and responsive, delivering real‑time bilingual interaction directly in the browser.

8. Troubleshooting — Problem Solving

Duo Voice is designed to work reliably in modern browsers, but audio permissions, device settings, and browser limitations can occasionally cause issues. This section lists the most common problems and how to solve them quickly.

Microphone Not Working

  • Browser blocked the microphone.
    Check the permission prompt or allow mic access in browser settings.
  • Another app is using the microphone.
    Close video call apps or system audio tools that may lock the device.
  • Input device changed.
    Re-select the correct microphone in your OS sound settings.
  • Mobile: mic always enabled.
    On mobile, Duo Voice keeps the mic active automatically; reload the page if permissions were revoked.

System Audio Not Working (Desktop Only)

  • Browser does not support system audio capture.
    Use Chrome or Edge — Safari and Firefox do not support tab audio capture.
  • Audio is muted or too quiet.
    Increase volume in the tab or system mixer.
  • Wrong tab selected.
    System audio captures only the active tab.
  • Flip unavailable.
    Flip works only when system audio is turned off.

High Latency or Delays

  • Slow network connection.
    WebSocket streaming requires stable internet; try switching networks.
  • Heavy CPU load.
    Close background apps or browser tabs that consume CPU.
  • Mobile device overheating.
    Mobile browsers throttle performance under heat; let the device cool.
  • Large TTS queue.
    TTS plays in strict order; disable TTS if you only need text.

No Translation Appears

  • Translation disabled.
    Enable translation toggle before or during the session.
  • Translation language not selected.
    Choose a target language before pressing Start.
  • Flip changed the direction.
    After Flip, translation direction swaps; verify the new configuration.

TTS Not Playing

  • Sound disabled.
    Enable TTS in the settings.
  • Mic feedback protection.
    On desktop, TTS may be blocked if mic is active without headphones.
  • Mobile autoMuteLoop.
    Mobile mutes the mic during TTS; this is normal behavior.
  • Browser autoplay restrictions.
    Interact with the page once (click/tap) to allow audio playback.

Swipe Mode Issues

  • Single-column mode activated.
    Narrow windows automatically switch to swipe mode; widen the window to return.
  • Cannot find translation.
    Swipe or tap to switch between original and translation.

Transcript Problems

  • Transcript empty.
    Only the current session is saved; previous sessions are erased by Start.
  • Missing lines.
    Only final recognized lines are stored; partial drafts are not saved.
  • Edits not saved.
    Edits are saved only after pressing “Save transcript”.

General Browser Issues

  • Reload the page.
    Most permission or audio routing issues resolve after a reload.
  • Use a modern browser.
    Chrome or Edge recommended for full functionality.
  • Disable extensions.
    Some extensions (privacy, audio routing, ad blockers) may interfere.

If problems persist, try restarting the browser or device. Duo Voice relies on stable audio permissions, modern WebAudio support, and uninterrupted WebSocket streaming.

9. FAQ — Frequently Asked Questions

This FAQ covers the most common questions users ask about Duo Voice. It helps clarify how audio sources, translation, TTS, Flip, and transcripts work in real time.

Does Duo Voice work in any browser?

Duo Voice works best in Chrome and Edge. Safari and Firefox have limited support for system audio capture.

Can Duo Voice translate both microphone and system audio at the same time?

Yes. Both sources run in parallel, each with its own recognition language and independent ASR pipeline.

Why does Flip disappear when system audio is enabled?

Flip works only when system audio is turned off. System audio does not require language swapping.

Does Flip interrupt the session?

No. Flip swaps languages instantly and continues streaming without restarting or losing data.

Why do I see only one column on mobile or narrow screens?

Duo Voice automatically switches to swipe mode. Swipe or tap to switch between original and translation.

Can I edit recognized text?

Yes. Click any line to edit it. Edits are saved in the transcript when you press “Save transcript”.

Does Duo Voice save previous sessions?

No. Pressing Start begins a new session and permanently clears all previous data.

Why is TTS not playing?

TTS may be blocked if the browser requires user interaction, if sound is disabled, or if the mic is active without headphones on desktop. On mobile, autoMuteLoop temporarily mutes the mic during TTS.

Can I translate YouTube videos or online lessons?

Yes. Enable system audio (desktop only) and Duo Voice will transcribe and translate the audio from the active tab.

Does Duo Voice support partial (live) transcription?

Yes. Partial text appears instantly and updates until the final result replaces it.

Can I use Duo Voice offline?

No. Duo Voice requires an internet connection for WebSocket streaming and translation.

Why does the microphone stay enabled on mobile?

Mobile browsers handle permissions differently. Keeping the mic always enabled ensures stable operation and prevents permission loss during TTS playback.

Does Duo Voice support bilingual conversations?

Yes. Flip allows instant switching of translation direction, making Duo Voice ideal for two‑way dialogue.

Can I replay audio?

Yes. Each line has a Play button that replays original audio or TTS translation depending on the selected side.

Why are some lines missing in the transcript?

Only final recognized lines are saved. Partial drafts or incomplete ASR segments are not stored.

For additional help, check the Troubleshooting section or reload the page to reset audio permissions.