Skip to content

feat(audio): capture audio from a specific application instead of system-wide (ref: OBS Application Audio Capture) #335

Description

@jiangzhuo

Background

A user reported (via support email) that when translating, any other audio playing on the computer — games, videos, music — gets captured together with the meeting audio and misleads the translation. This happens because Sokuji captures system-wide audio: the model cannot tell game/video speech apart from meeting speech.

Current workaround: pause all other audio while translating, which is a poor experience.

Feature Request

Allow the user to capture audio from a specific application (e.g. only the meeting app or browser tab) instead of the entire system, so unrelated audio never reaches the translation pipeline.

Reference: OBS Application Audio Capture (Beta)

The user (on Windows 11) pointed out that OBS recently added exactly this capability, which can serve as an implementation reference.

  • OBS 28+ ships an "Application Audio Capture (BETA)" source on Windows: pick a window/process, and only that application's audio is captured.
  • Under the hood it uses the WASAPI process loopback API available since Windows 10 2004: ActivateAudioInterfaceAsync with AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK, capturing a process tree's audio (optionally include/exclude child processes).
  • OBS implementation: win-wasapi plugin (see win-wasapi.cpp, capture mode AUDIOCLIENT_PROCESS_LOOPBACK).

Platform Notes

Per-application capture needs different plumbing on every OS:

Platform Mechanism Feasibility
Windows 10 2004+ / 11 WASAPI process loopback (what OBS uses) Best target — native API, needs a native module or sidecar in Electron
macOS ScreenCaptureKit (SCStream audio, macOS 13+) supports per-app audio capture Possible, separate implementation
Linux PulseAudio / PipeWire per-sink-input routing (we already do virtual device management here) Possible via existing plumbing
Browser extension chrome.tabCapture already scopes audio to a tab Partially solved by design

Scope / Open Questions

  • Electron main process cannot call WASAPI directly — needs a native Node module (N-API) or a small helper/sidecar process.
  • UI: an "audio source" picker (System audio / specific application) in audio settings.
  • How this interacts with the existing echo-cancellation and passthrough paths.

Origin

Requested by a user on Windows 11 via support email (2026-07-16).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions