easysub-org

easysub-helper

easysub-org

EasySub Helper is a local audio capture relay that grabs 16 kHz mono PCM through OS APIs and pushes it over a loopback WebSocket to a browser-based subtitle page.

v0.1.5
Published at
Oct 14, 2026
1
Stars
33
Download
Synced at
16d ago

Latest release

v0.1.5Oct 14, 2026, 12:46 PM
Downloads slow? Switch the source anytime above

README

Project Overview

It is most accurate to think of easysub-helper as an external sound card, except it never touches a card slot: it runs as a process and feeds system audio over a 127.0.0.1 WebSocket into a browser page. Browsers are strict about system audio capture: Firefox returns silent audio from getDisplayMedia, Chrome on macOS and Linux only offers tab audio, and chrome.tabCapture exists only in Chrome. Capturing in a local process while the page only recognizes and renders is therefore the only cross-browser solution. The helper hosts no page, loads no model and runs no inference.

Item Value
Platform Windows (including a Windows 7 build), Linux, macOS 14.2+
Stack Python >= 3.6, aiohttp, numpy, soundcard
Port 8790 by default, shifting up to 20 ports when occupied
Audio format 16 kHz mono f32le
License AGPL-3.0-or-later

Capture and pairing are done cleanly, leaving recognition and display entirely to the page.

Hosts and Platforms

Platform Default backend System audio source Permission
Windows (and Windows 7) soundcard WASAPI loopback of the full mix, no virtual device needed No prompt
Linux parec / pw-record, falling back to soundcard PulseAudio / PipeWire monitor source None
macOS 14.2+ mac-system, requires a self-installed pysysaudio ScreenCaptureKit / Core Audio tap, driver-free Screen and system audio recording consent
macOS below 14.2 mac-system falling back to soundcard Needs a loopback device such as BlackHole Same as above

Key Features

  • System audio capture: three backends covering WASAPI loopback, PulseAudio monitor and Core Audio tap
  • Device switching: choose the source (system audio or microphone) and a specific device in the window, with live sessions reopening the device immediately
  • Pairing for tokens: a 6-character pairing code exchanges for a long-lived device token, stored locally only as a sha256 hash
  • Level monitoring: a 12-second scrolling waveform and segmented meter prove capture is running even before pairing
  • Pause without disconnecting: pausing releases the device but keeps the socket alive by sending all-zero frames every 20 ms
  • Tray residency: closing the window minimizes to tray, using StatusNotifierItem over D-Bus on Linux and pystray on Windows

Install and Enable

  1. Take the matching file from the release: easysub-helper.exe, the Linux easysub-helper binary, or the bare macOS executable
  2. Launch it; the status line shows the port (8790 by default) and a 6-character pairing code
  3. Choose a source, pick a device if you want a specific microphone, then press Start; capture begins paused
  4. On the subtitle page select the desktop helper source and enter the pairing code
  5. Press start recognition on the page, after which the window can be closed to the tray while capture continues

Interface and Protocol

  • GET /api/pair/info: unauthenticated probe returning only whether the helper is running, paired or paused
  • POST /api/pair: send {"code":"KPA-4DA"} and receive {ok,token,label}, with CORS open by default
  • GET /ws?token=...: the audio channel, where text frames are JSON (hello, state, level, error, pong) and binary frames are raw PCM
  • Fixed-size frames: 20 ms per frame, 320 samples and 1280 bytes with no header
  • Rate limiting: five failures in 60 seconds lock pairing for 300 seconds, correct codes included, and the window's new-code button clears the lock

Notes

  • Pairing is mandatory: /ws accepts only tokens, so without a code-exchanged token no audio flows
  • Loopback binding by default: binding --host to a non-loopback address requires --allow-lan, which exposes the audio stream to the LAN
  • The page must be crossOriginIsolated: the subtitle page needs COOP/COEP or coi-serviceworker.js, which the helper does not provide
  • Ports can drift: the shift is capped at 20 ports while pages only probe 8790-8810, so a custom --port may land outside that range and must be typed into the page
  • The macOS driver-free backend is optional: pysysaudio is not bundled, so install it with pip and grant screen and system audio recording permission

Release history

Sort