Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Commits on master

Multi-input recording: pick a primary mic + an optional secondary device, mix them via Web Audio at recording time — solves the macOS / Linux meeting-recording problem where neither getDisplayMedia (tab-only) nor swapping the mic source in pavucontrol (loses the user's voice) can capture both sides of a conversation in one go; new state refs in app.modular.js (inputAudioDevices, selectedMicDeviceId, selectedSecondaryDeviceId — both deviceIds persisted in localStorage), plus refreshInputAudioDevices() that calls navigator.mediaDevices.enumerateDevices and tags Pulse monitor / BlackHole / VB-Cable / Voicemeeter / Stereo Mix / PipeWire monitor sources as isVirtual so the picker can badge them; audio.js's microphone-mode capture rewritten — when a secondary device is selected the code captures TWO getUserMedia streams with distinct deviceId constraints, builds a GainNode mixer in the AudioContext, connects both sources into it, routes the mixer output to a MediaStreamDestination and feeds that consolidated stream to MediaRecorder; the analyser hook is taken off the mixer too so the visualizer reflects the combined waveform; falls back gracefully to single-stream recording if the secondary device disappears between picker-populate and start-recording, with a toast explaining; single-stream path preserved unchanged for the common case so MediaRecorder still consumes the raw mic stream directly with no Web Audio hop; device-picker UI added to the upload modal as a collapsed <details> group under the recording buttons — when expanded shows two selects (primary + 'Also mix in (optional)') with monitor / virtual entries tagged; pre-permission state shows a button that calls getUserMedia briefly to populate device labels; refreshInputAudioDevices is automatically re-run after the first mic-permission grant inside startRecordingInternal so the labels become real names instead of opaque IDs
Murtaza Nasir committed 5 months ago
ea44dca
System audio capture: platform detection + per-OS help modal + virtual audio device discovery — (1) new utils/platform.js exports detectPlatform() (returns {os, browser} from navigator), getAudioCapabilities() (returns supportsTabAudio / supportsWindowAudio / supportsSystemAudio flags driven by the browser+OS matrix — only Chrome/Edge on Windows or ChromeOS deliver true OS-wide capture; macOS/Linux are tab-audio-only; Firefox/Safari can't capture audio via getDisplayMedia at all) and enumerateVirtualAudioDevices() (scans navigator.mediaDevices.enumerateDevices for BlackHole / Loopback / VB-Cable / Voicemeeter / Stereo Mix / Pulse-or-PipeWire monitor sources by label regex); (2) system-audio-help-modal.html rebuilt as a per-OS setup guide — three tabs (macOS / Windows / Linux), auto-pre-selected from detectPlatform, capability summary banner at top that goes green when full system audio is supported and amber when it's not, plus a section that surfaces any virtual audio devices Speakr already found on the user's machine; (3) upload-view.html buttons now show a small amber dot when full system audio isn't expected to work on the current platform (tab-audio-only) and a compact 'how to enable full system audio' link below; (4) audio.js now opens the help modal automatically when a system-audio capture returns no audio track, so the user gets contextual guidance instead of a generic toast; (5) after the user grants microphone permission, refreshVirtualAudioDevices runs again so device labels can populate the virtual-device list (labels are blank pre-permission and pattern matching needs them)
Murtaza Nasir committed 5 months ago
f8b35d5