Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
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 Nasirf8b35d5fe569
diff --git a/static/js/app.modular.js b/static/js/app.modular.jsindex 6c5d5973..799fd775 100644--- a/static/js/app.modular.js+++ b/static/js/app.modular.js@@ -22,6 +22,7 @@ import { useFolders } from './modules/composables/folders.js';import { showToast } from './modules/utils/toast.js';import { getContrastTextColor } from './modules/utils/colors.js';import { buildVariableList } from './modules/utils/prompt-variables.js';+import { detectPlatform, getAudioCapabilities, enumerateVirtualAudioDevices } from './modules/utils/platform.js';// Number of speaker colors available in CSS (must match styles.css)const SPEAKER_COLOR_COUNT = 16;@@ -357,6 +358,29 @@ document.addEventListener('DOMContentLoaded', async () => {const recordingNotes = ref('');const showSystemAudioHelp = ref(false);const showSystemAudioHelpModal = ref(false);+ // Platform + capability state for the system-audio flow.+ // Detected once on init; the help modal uses these to+ // pre-select the right OS tab and to gate which paragraphs+ // it shows. Virtual audio devices are scanned after the+ // user grants a microphone permission since labels are+ // empty before then.+ const platformInfo = ref(detectPlatform());+ const audioCaps = ref(getAudioCapabilities());+ const helpModalOsTab = ref(platformInfo.value.os === 'iOS' || platformInfo.value.os === 'Android'+ ? 'macOS' // mobile users get the desktop guide as a default; the modal still shows a mobile note+ : (platformInfo.value.os === 'ChromeOS' ? 'Windows' : (platformInfo.value.os || 'Windows')));+ const virtualAudioDevices = ref([]);+ const refreshVirtualAudioDevices = async () => {+ try {+ virtualAudioDevices.value = await enumerateVirtualAudioDevices();+ } catch (_) {+ virtualAudioDevices.value = [];+ }+ };+ // Initial probe — labels are usually empty pre-permission+ // so the result is often []; refreshed again after the+ // first getUserMedia / getDisplayMedia grant.+ refreshVirtualAudioDevices();const showRecoveryModal = ref(false);const recoverableRecording = ref(null);const asrLanguage = ref('');@@ -1386,7 +1410,9 @@ document.addEventListener('DOMContentLoaded', async () => {// Audio RecordingisRecording, mediaRecorder, audioChunks, audioBlobURL, recordingTime, recordingInterval,canRecordAudio, canRecordSystemAudio, systemAudioSupported, systemAudioError,- recordingNotes, showSystemAudioHelp, showSystemAudioHelpModal, asrLanguage, asrMinSpeakers, asrMaxSpeakers,+ recordingNotes, showSystemAudioHelp, showSystemAudioHelpModal,+ platformInfo, audioCaps, helpModalOsTab, virtualAudioDevices, refreshVirtualAudioDevices,+ asrLanguage, asrMinSpeakers, asrMaxSpeakers,audioContext, analyser, micAnalyser, systemAnalyser, visualizer, micVisualizer,systemVisualizer, animationFrameId, recordingMode, activeStreams,wakeLock, recordingNotification, isPageVisible,@@ -1740,7 +1766,8 @@ document.addEventListener('DOMContentLoaded', async () => {formatStatus, getStatusClass, formatTime, formatDuration, formatEventDateTime,getDateForSorting, isToday, isYesterday, isThisWeek, isLastWeek, isThisMonth, isLastMonth, isSameDay,nextTick,- onChatComplete: loadTokenBudget // Refresh token budget after chat+ onChatComplete: loadTokenBudget, // Refresh token budget after chat+ refreshVirtualAudioDevices // Re-scan installed BlackHole / VB-Cable / monitor sources};// =========================================================================diff --git a/static/js/modules/composables/audio.js b/static/js/modules/composables/audio.jsindex c4871aad..018031a1 100644--- a/static/js/modules/composables/audio.js+++ b/static/js/modules/composables/audio.js@@ -13,7 +13,7 @@ export function useAudio(state, utils) {audioChunks, recordingTime, recordingInterval, recordingMode, audioBlobURL,estimatedFileSize, actualBitrate, recordingNotes, recordingQuality,maxRecordingMB, fileSizeWarningShown, sizeCheckInterval, recordingDisclaimer,- showRecordingDisclaimerModal, pendingRecordingMode, currentView, showUploadModal, isDarkMode, wakeLock, animationFrameId,+ showRecordingDisclaimerModal, pendingRecordingMode, currentView, showUploadModal, showSystemAudioHelp, isDarkMode, wakeLock, animationFrameId,activeStreams, visualizer, micVisualizer, systemVisualizer, canRecordAudio,canRecordSystemAudio, systemAudioSupported, systemAudioError, globalError,selectedTagIds, selectedFolderId, asrLanguage, asrMinSpeakers, asrMaxSpeakers, uploadQueue,@@ -199,7 +199,10 @@ export function useAudio(state, utils) {const audioTrack = displayStream.getAudioTracks()[0];if (!audioTrack) {displayStream.getTracks().forEach(track => track.stop());- showToast('No audio track - check "Share audio" option', 'error');+ // Open the platform-aware help modal so the user+ // gets per-OS guidance instead of a bare toast.+ if (showSystemAudioHelp) showSystemAudioHelp.value = true;+ showToast('No audio track came through — see the help guide for per-OS setup.', 'fa-exclamation-triangle');return;}@@ -270,6 +273,13 @@ export function useAudio(state, utils) {}});activeStreams.value = [stream];+ // Now that the user has granted mic permission,+ // device labels populate — re-scan for virtual audio+ // routing devices (BlackHole / VB-Cable / monitor+ // sources) so the upload modal can offer them.+ if (utils.refreshVirtualAudioDevices) {+ utils.refreshVirtualAudioDevices();+ }audioContext.value = new (window.AudioContext || window.webkitAudioContext)();const source = audioContext.value.createMediaStreamSource(stream);@@ -303,12 +313,17 @@ export function useAudio(state, utils) {const audioTrack = stream.getAudioTracks()[0];if (!audioTrack) {stream.getTracks().forEach(track => track.stop());- const browserName = isFirefox ? 'Firefox' : 'your browser';+ // Open the platform-aware help modal so the user+ // sees the per-OS setup instructions instead of+ // just a generic error toast. The thrown error+ // still surfaces as a toast so the failure is+ // acknowledged.+ if (showSystemAudioHelp) showSystemAudioHelp.value = true;throw new Error(- `No system audio track available. In ${browserName}, please:\n` +- `1. Share a BROWSER TAB that is actively playing audio\n` +- `2. Make sure "Share tab audio" checkbox is checked\n` +- `3. The audio must be playing when you start sharing`+ 'No audio track came through with the screen share. ' ++ 'Make sure you ticked "Share system audio" / "Share tab audio" ' ++ 'in the share dialog. The help guide that just opened has ' ++ 'platform-specific instructions.');}@@ -357,12 +372,14 @@ export function useAudio(state, utils) {if (!systemAudioTrack) {micStream.getTracks().forEach(track => track.stop());displayStream.getTracks().forEach(track => track.stop());- const browserName = isFirefox ? 'Firefox' : 'your browser';+ // Open the platform-aware help modal so the user+ // sees per-OS setup instead of a generic error.+ if (showSystemAudioHelp) showSystemAudioHelp.value = true;throw new Error(- `No system audio track available. In ${browserName}, please:\n` +- `1. Share a BROWSER TAB that is actively playing audio\n` +- `2. Make sure "Share tab audio" checkbox is checked\n` +- `3. The audio must be playing when you start sharing`+ 'No audio track came through with the screen share. ' ++ 'Make sure you ticked "Share system audio" / "Share tab audio" ' ++ 'in the share dialog. The help guide that just opened has ' ++ 'platform-specific instructions.');}diff --git a/static/js/modules/utils/platform.js b/static/js/modules/utils/platform.jsnew file mode 100644index 00000000..2ff781ec--- /dev/null+++ b/static/js/modules/utils/platform.js@@ -0,0 +1,182 @@+/**+ * Platform detection + audio capability matrix.+ *+ * Used by the upload modal's system-audio path to (a) show platform-+ * aware hints / warnings BEFORE the user clicks, (b) route capture+ * failures to a contextual help modal, and (c) surface virtual audio+ * devices (BlackHole, VB-Cable, Loopback, PulseAudio monitor sources)+ * as alternative microphone inputs when the user has installed one.+ *+ * The capability matrix encodes what browsers / OS combinations can+ * actually do — getDisplayMedia({audio:true}) is supported as an API+ * everywhere modern, but the underlying OS gates whether system audio+ * actually flows through. Only Chrome / Edge on Windows + Chrome OS+ * deliver true OS-wide system audio. macOS and Linux Chrome can only+ * capture audio when sharing a TAB (chrome.tabCapture-style behaviour+ * exposed via getDisplayMedia). Firefox and Safari can't capture any+ * audio through getDisplayMedia.+ */++const KNOWN_VIRTUAL_DEVICE_HINTS = [+ // macOS+ { match: /blackhole/i, os: 'macOS', name: 'BlackHole' },+ { match: /loopback/i, os: 'macOS', name: 'Loopback' },+ { match: /soundflower/i, os: 'macOS', name: 'Soundflower' },+ { match: /background music/i, os: 'macOS', name: 'Background Music' },+ { match: /existential audio/i, os: 'macOS', name: 'BlackHole' },+ // Windows+ { match: /vb[- ]?(audio|cable)/i, os: 'Windows', name: 'VB-Audio Cable' },+ { match: /voicemeeter/i, os: 'Windows', name: 'Voicemeeter' },+ { match: /stereo mix/i, os: 'Windows', name: 'Stereo Mix' },+ { match: /what u hear/i, os: 'Windows', name: 'What U Hear' },+ // Linux+ { match: /monitor of /i, os: 'Linux', name: 'PulseAudio Monitor' },+ { match: /pipewire.*monitor/i, os: 'Linux', name: 'PipeWire Monitor' },+ { match: /pulse.*monitor/i, os: 'Linux', name: 'PulseAudio Monitor' },+];++/**+ * Inspect the current user agent + platform string and return a small+ * normalized descriptor used everywhere else in the audio capture flow.+ * Cheap, sync, safe to call repeatedly.+ */+export function detectPlatform() {+ if (typeof navigator === 'undefined') {+ return { os: 'unknown', browser: 'unknown' };+ }+ const ua = navigator.userAgent || '';+ const platform = (navigator.userAgentData?.platform || navigator.platform || '').toLowerCase();++ let os = 'unknown';+ if (/iphone|ipad|ipod/i.test(ua) || (/mac/.test(platform) && navigator.maxTouchPoints > 1)) {+ os = 'iOS';+ } else if (/mac/i.test(platform) || /mac os x/i.test(ua)) {+ os = 'macOS';+ } else if (/win/i.test(platform) || /windows/i.test(ua)) {+ os = 'Windows';+ } else if (/cros|chrome os/i.test(ua) || /cros/i.test(platform)) {+ os = 'ChromeOS';+ } else if (/android/i.test(ua)) {+ os = 'Android';+ } else if (/linux/i.test(platform) || /linux/i.test(ua)) {+ os = 'Linux';+ }++ let browser = 'unknown';+ // Order matters: Edge UA contains "Chrome", so check Edge first.+ if (/edg(e|ios|a)?\//i.test(ua)) browser = 'Edge';+ else if (/firefox|fxios/i.test(ua)) browser = 'Firefox';+ else if (/chrome|crios/i.test(ua)) browser = 'Chrome';+ else if (/safari/i.test(ua)) browser = 'Safari';+ else if (/opera|opr\//i.test(ua)) browser = 'Opera';++ return { os, browser };+}++/**+ * Returns a structured capability report describing what audio capture+ * is realistically available on the current browser + OS — for use by+ * the UI to show pre-emptive hints and to know whether to route a+ * failed capture to the help modal.+ *+ * Flags:+ * - supportsGetUserMedia: classic microphone capture+ * - supportsGetDisplayMedia: the API exists at all+ * - supportsTabAudio: getDisplayMedia({audio:true}) is expected to+ * deliver audio when the user picks "Share tab"+ * - supportsWindowAudio: ... when picking a window+ * - supportsSystemAudio: ... full OS-wide audio (Windows / ChromeOS+ * only via the "Share system audio" checkbox)+ * - virtualDeviceHint: a string the help modal can show — name of the+ * virtual audio routing tool that's idiomatic on this OS+ */+export function getAudioCapabilities() {+ const p = detectPlatform();+ const hasGUM = typeof navigator !== 'undefined'+ && navigator.mediaDevices+ && typeof navigator.mediaDevices.getUserMedia === 'function';+ const hasGDM = typeof navigator !== 'undefined'+ && navigator.mediaDevices+ && typeof navigator.mediaDevices.getDisplayMedia === 'function';++ let supportsTabAudio = false;+ let supportsWindowAudio = false;+ let supportsSystemAudio = false;+ let virtualDeviceHint = null;++ if (hasGDM) {+ // Firefox: getDisplayMedia({audio:true}) returns a stream but no+ // audio track on any platform. Effectively no audio capture.+ if (p.browser === 'Firefox') {+ // intentionally all false+ }+ // Safari: same story+ else if (p.browser === 'Safari') {+ // intentionally all false+ }+ // Chrome / Edge: matrix below+ else if (p.browser === 'Chrome' || p.browser === 'Edge') {+ supportsTabAudio = true;+ if (p.os === 'Windows' || p.os === 'ChromeOS') {+ supportsWindowAudio = true;+ supportsSystemAudio = true;+ }+ // macOS / Linux: only tab audio works in practice.+ }+ }++ if (p.os === 'macOS') virtualDeviceHint = 'BlackHole';+ if (p.os === 'Windows') virtualDeviceHint = 'VB-Audio Cable';+ if (p.os === 'Linux') virtualDeviceHint = 'PulseAudio monitor source';++ return {+ platform: p,+ supportsGetUserMedia: hasGUM,+ supportsGetDisplayMedia: hasGDM,+ supportsTabAudio,+ supportsWindowAudio,+ supportsSystemAudio,+ virtualDeviceHint,+ };+}++/**+ * Scan enumerateDevices() for installed virtual audio routing devices.+ * Returns an array of { deviceId, label, virtualToolName, os } entries+ * that the upload UI can surface as alternative microphone inputs (the+ * user routes system audio through them and then captures via the+ * regular microphone path).+ *+ * Returns [] when permission hasn't been granted yet (labels are blank+ * pre-permission, so we can't pattern-match). The UI should retry this+ * after the user grants mic permission once.+ */+export async function enumerateVirtualAudioDevices() {+ if (typeof navigator === 'undefined'+ || !navigator.mediaDevices+ || typeof navigator.mediaDevices.enumerateDevices !== 'function') {+ return [];+ }+ let devices;+ try {+ devices = await navigator.mediaDevices.enumerateDevices();+ } catch (_) {+ return [];+ }+ const inputs = devices.filter(d => d.kind === 'audioinput' && d.label);+ const matches = [];+ for (const d of inputs) {+ for (const hint of KNOWN_VIRTUAL_DEVICE_HINTS) {+ if (hint.match.test(d.label)) {+ matches.push({+ deviceId: d.deviceId,+ label: d.label,+ virtualToolName: hint.name,+ os: hint.os,+ });+ break;+ }+ }+ }+ return matches;+}diff --git a/templates/components/upload-view.html b/templates/components/upload-view.htmlindex 74739869..0ed95f63 100644--- a/templates/components/upload-view.html+++ b/templates/components/upload-view.html@@ -216,18 +216,30 @@<span v-text="t('recording.microphone')"></span></button>- <!-- System Audio and Both - Side by Side -->+ <!-- System Audio and Both - Side by Side. Buttons stay+ visible whenever the browser supports getDisplayMedia+ at all (incl. tab-only-audio platforms) — the help+ modal explains the per-OS limitations and routing+ options. A small amber dot appears on the buttons+ when full system audio isn't expected to work on+ this platform so the user knows BEFORE clicking. --><div v-if="canRecordSystemAudio" class="grid grid-cols-2 gap-2"><!-- System Audio Recording --><button @click="startRecording('system')"- class="px-3 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center justify-center gap-1.5 text-sm">+ class="relative px-3 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center justify-center gap-1.5 text-sm">+ <span v-if="audioCaps && audioCaps.supportsTabAudio && !audioCaps.supportsSystemAudio"+ class="absolute top-1 right-1 w-2 h-2 rounded-full bg-amber-400"+ title="Tab audio only on this platform — see help"></span><i class="fas fa-desktop"></i><span v-text="t('recording.systemAudio')"></span></button><!-- Both Audio Sources --><button @click="startRecording('both')"- class="px-3 py-2.5 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors flex items-center justify-center gap-1 text-sm">+ class="relative px-3 py-2.5 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors flex items-center justify-center gap-1 text-sm">+ <span v-if="audioCaps && audioCaps.supportsTabAudio && !audioCaps.supportsSystemAudio"+ class="absolute top-1 right-1 w-2 h-2 rounded-full bg-amber-400"+ title="Tab audio only on this platform — see help"></span><i class="fas fa-microphone"></i><i class="fas fa-desktop"></i><span class="hidden sm:inline" v-text="t('recording.microphoneAndSystem')"></span>@@ -235,6 +247,27 @@</button></div>+ <!-- Compact platform-aware hint when full system audio is+ not available on this OS / browser combination. -->+ <div v-if="audioCaps && audioCaps.supportsTabAudio && !audioCaps.supportsSystemAudio"+ class="text-[11px] text-[var(--text-muted)] flex items-center gap-1 mt-1">+ <i class="fas fa-circle-info text-amber-500"></i>+ <span>+ On <span v-text="platformInfo.os"></span> the browser can only capture <strong>tab audio</strong> directly —+ <button @click="showSystemAudioHelp = true" class="underline" style="color: var(--text-accent);">how to enable full system audio</button>.+ </span>+ </div>++ <!-- Detected virtual audio device — surfaced as an+ alternative microphone input. -->+ <div v-if="virtualAudioDevices && virtualAudioDevices.length > 0"+ class="text-[11px] flex items-center gap-1 mt-1">+ <i class="fas fa-check-circle text-green-500"></i>+ <span style="color: var(--text-secondary);">+ Detected <span v-text="virtualAudioDevices[0].label"></span> — pick it from the microphone dropdown to route system audio in.+ </span>+ </div>+<!-- Help Text - Compact --><div class="text-[10px] text-[var(--text-muted)] space-y-0.5 mt-2"><div class="flex items-center justify-between">diff --git a/templates/modals/system-audio-help-modal.html b/templates/modals/system-audio-help-modal.htmlindex b5f63f09..74ea5457 100644--- a/templates/modals/system-audio-help-modal.html+++ b/templates/modals/system-audio-help-modal.html@@ -1,40 +1,148 @@-<!-- System Audio Help Modal (design system v1) -->+<!-- System Audio Setup Guide.++ Per-OS instructions. The active tab is pre-selected to the user's+ detected platform (helpModalOsTab) when the modal opens, but the+ user can switch to read the others. The capability matrix at the+ top is sourced from the detectPlatform() / getAudioCapabilities()+ helpers in static/js/modules/utils/platform.js. --><div v-if="showSystemAudioHelp" @click.self="showSystemAudioHelp = false" class="modal-overlay">- <div class="modal-panel modal-panel--md">+ <div class="modal-panel modal-panel--lg"><div class="modal-header">- <h3 class="modal-title" v-text="t('help.systemAudioHelp')"></h3>+ <i class="fas fa-desktop text-2xl" style="color: var(--text-accent);"></i>+ <h3 class="modal-title">Capturing system audio</h3><button @click="showSystemAudioHelp = false" class="modal-close" :title="t('buttons.close')"><i class="fas fa-times"></i></button></div><div class="modal-body">- <div class="banner banner--info" style="display: flex; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-4);">- <i class="fas fa-info-circle" style="margin-top: 2px;"></i>++ <!-- Capability summary banner -->+ <div class="banner" :class="audioCaps.supportsSystemAudio ? 'banner--success' : 'banner--warn'" style="display: flex; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-4);">+ <i :class="['fas', audioCaps.supportsSystemAudio ? 'fa-check-circle' : 'fa-info-circle']" style="margin-top: 2px;"></i><div>- <div class="t-body-strong" style="margin-bottom: var(--sp-1);">Browser Compatibility</div>- <div class="t-meta">System audio recording works best in Chrome, Edge, and Brave. Firefox is supported but requires the tab to be actively playing audio. Not supported on Safari or mobile devices.</div>+ <div class="t-body-strong" style="margin-bottom: var(--sp-1);">+ You're on <span v-text="platformInfo.os"></span> · <span v-text="platformInfo.browser"></span>+ </div>+ <div class="t-meta" v-if="audioCaps.supportsSystemAudio">+ Full system-audio capture is supported. When you click <strong>System Audio</strong> or <strong>Mic + System</strong>, pick <strong>Entire Screen</strong> in the share dialog and tick <strong>Share system audio</strong>.+ </div>+ <div class="t-meta" v-else-if="audioCaps.supportsTabAudio">+ Browser-level system-audio is not available on this OS / browser combination. The browser can still capture <strong>tab audio</strong> (when you share a tab playing sound), or you can route system audio through a virtual audio device — see your tab below.+ </div>+ <div class="t-meta" v-else>+ This browser doesn't support audio capture via screen sharing at all. Use Chrome or Edge to record system audio, or record from a microphone instead.+ </div></div></div>- <div style="margin-bottom: var(--sp-4);">- <div class="t-body-strong" style="margin-bottom: var(--sp-2);">How to record system audio:</div>- <ol class="list-decimal list-inside space-y-1 t-body" style="color: var(--text-secondary);">- <li>Click "System Audio" or "Mic + System" button</li>- <li>A screen sharing dialog will appear</li>- <li>Select a tab or window that is <strong>actively playing audio</strong></li>- <li>Make sure "Share audio" checkbox is <strong>checked</strong></li>- <li>Click "Share" to start recording</li>- </ol>+ <!-- OS tab strip -->+ <div class="tabs" style="margin-bottom: var(--sp-4);">+ <button @click="helpModalOsTab = 'macOS'" class="tab" :class="{'is-active': helpModalOsTab === 'macOS'}">+ <i class="fab fa-apple"></i><span>macOS</span>+ </button>+ <button @click="helpModalOsTab = 'Windows'" class="tab" :class="{'is-active': helpModalOsTab === 'Windows'}">+ <i class="fab fa-windows"></i><span>Windows</span>+ </button>+ <button @click="helpModalOsTab = 'Linux'" class="tab" :class="{'is-active': helpModalOsTab === 'Linux'}">+ <i class="fab fa-linux"></i><span>Linux</span>+ </button>+ </div>++ <!-- macOS -->+ <div v-if="helpModalOsTab === 'macOS'" class="space-y-3">+ <p class="t-body">+ macOS doesn't let any browser capture system audio directly — the OS treats audio capture as a privileged operation that browsers (sandboxed apps) can't request. The standard workaround is a free virtual audio driver that routes the system output back into an input device the browser can read like a microphone.+ </p>+ <div>+ <div class="t-body-strong" style="margin-bottom: var(--sp-1);">Option A — Tab audio (no install)</div>+ <ol class="list-decimal list-inside space-y-1 t-body" style="color: var(--text-secondary);">+ <li>Open the source content in a <strong>tab</strong> (YouTube, Zoom web, etc.)</li>+ <li>Click <strong>System Audio</strong> in Speakr and pick the tab in the share dialog</li>+ <li>Tick <strong>Share tab audio</strong> before clicking Share</li>+ </ol>+ <p class="t-meta" style="margin-top: var(--sp-2);">Works only for content playing in a browser tab. App audio (Slack, native Zoom client, etc.) won't be captured.</p>+ </div>+ <div>+ <div class="t-body-strong" style="margin-bottom: var(--sp-1);">Option B — Virtual audio device (recommended)</div>+ <ol class="list-decimal list-inside space-y-1 t-body" style="color: var(--text-secondary);">+ <li>Install <a href="https://existential.audio/blackhole/" target="_blank" rel="noopener" style="color: var(--text-accent); text-decoration: underline;">BlackHole 2ch</a> (free) — installer signs in, no kernel-extension prompts.</li>+ <li>Open <strong>Audio MIDI Setup</strong> → create a <strong>Multi-Output Device</strong> containing your speakers + BlackHole. Set this as the system output.</li>+ <li>In Speakr, click <strong>Microphone</strong> and pick <strong>BlackHole 2ch</strong> as the input.</li>+ </ol>+ <p class="t-meta" style="margin-top: var(--sp-2);">After this is set up, system audio captures continuously regardless of which tab/window is active.</p>+ </div>+ <p class="t-meta">+ Alternative paid tools: <a href="https://rogueamoeba.com/loopback/" target="_blank" rel="noopener" style="color: var(--text-accent); text-decoration: underline;">Loopback</a> (Rogue Amoeba) is the most polished UX.+ </p></div>- <div>- <div class="t-body-strong" style="margin-bottom: var(--sp-2);">Troubleshooting:</div>- <ul class="list-disc list-inside space-y-1 t-meta">- <li><strong>Important:</strong> The tab/window must be playing audio when you share it</li>- <li>Check that "Share audio" checkbox is checked in the sharing dialog</li>- <li>In Firefox, start playing audio first, then click record</li>- <li>Some content may have DRM protection that blocks recording</li>- <li>Not supported on Safari or mobile browsers</li>- </ul>+ <!-- Windows -->+ <div v-else-if="helpModalOsTab === 'Windows'" class="space-y-3">+ <p class="t-body">+ Windows is the easiest platform — Chrome and Edge can capture audio from any source the OS plays, including specific apps. No extra software needed.+ </p>+ <div>+ <div class="t-body-strong" style="margin-bottom: var(--sp-1);">System-wide capture</div>+ <ol class="list-decimal list-inside space-y-1 t-body" style="color: var(--text-secondary);">+ <li>Click <strong>System Audio</strong> or <strong>Mic + System</strong> in Speakr</li>+ <li>In the share dialog, pick <strong>Entire Screen</strong></li>+ <li>Tick <strong>Share system audio</strong> (bottom-left of the dialog)</li>+ <li>Click <strong>Share</strong></li>+ </ol>+ </div>+ <div>+ <div class="t-body-strong" style="margin-bottom: var(--sp-1);">Per-window capture</div>+ <ol class="list-decimal list-inside space-y-1 t-body" style="color: var(--text-secondary);">+ <li>Pick <strong>Window</strong> instead of Entire Screen</li>+ <li>Choose the specific app's window</li>+ <li>Tick <strong>Share window audio</strong></li>+ </ol>+ <p class="t-meta" style="margin-top: var(--sp-2);">Captures only the chosen app's audio — useful for meeting recordings without your own keyboard/typing noise.</p>+ </div>+ <p class="t-meta">+ Stuck on "no audio track" errors? Some apps (Spotify desktop, DRM-protected video) suppress system-audio capture. Use a virtual cable like <a href="https://vb-audio.com/Cable/" target="_blank" rel="noopener" style="color: var(--text-accent); text-decoration: underline;">VB-Audio Cable</a> as a workaround.+ </p></div>++ <!-- Linux -->+ <div v-else-if="helpModalOsTab === 'Linux'" class="space-y-3">+ <p class="t-body">+ Browsers on Linux can only capture tab audio directly. For full system audio, route the desktop output through a PulseAudio or PipeWire monitor source and pick it as the input device when recording.+ </p>+ <div>+ <div class="t-body-strong" style="margin-bottom: var(--sp-1);">PulseAudio / PipeWire monitor source</div>+ <ol class="list-decimal list-inside space-y-1 t-body" style="color: var(--text-secondary);">+ <li>Open <code style="background: var(--bg-tertiary); padding: 1px 4px; border-radius: 3px;">pavucontrol</code> (PulseAudio Volume Control)</li>+ <li>Click <strong>System Audio</strong> in Speakr — a Chrome share dialog appears</li>+ <li>In pavucontrol → <strong>Recording</strong> tab, find the Speakr capture entry and change its source to <strong>Monitor of <your output sink></strong></li>+ <li>Audio now flows from system playback into Speakr</li>+ </ol>+ </div>+ <div>+ <div class="t-body-strong" style="margin-bottom: var(--sp-1);">PipeWire (newer distros)</div>+ <p class="t-body" style="color: var(--text-secondary);">+ Same idea: use <code style="background: var(--bg-tertiary); padding: 1px 4px; border-radius: 3px;">qpwgraph</code> or <code style="background: var(--bg-tertiary); padding: 1px 4px; border-radius: 3px;">helvum</code> to wire the playback sink's monitor into Chrome's capture input.+ </p>+ </div>+ </div>++ <!-- Detected virtual audio devices -->+ <div v-if="virtualAudioDevices && virtualAudioDevices.length > 0"+ class="banner banner--success"+ style="display: flex; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-4);">+ <i class="fas fa-check-circle" style="margin-top: 2px;"></i>+ <div>+ <div class="t-body-strong" style="margin-bottom: var(--sp-1);">Virtual audio device detected</div>+ <div class="t-meta">+ Speakr found these on your system — they're already wired up:+ <ul class="list-disc list-inside" style="margin-top: var(--sp-1);">+ <li v-for="d in virtualAudioDevices" :key="d.deviceId">+ <span style="font-family: var(--font-mono, ui-monospace, monospace);" v-text="d.label"></span>+ — pick this from the Microphone dropdown to capture system audio.+ </li>+ </ul>+ </div>+ </div>+ </div>+</div><div class="modal-footer"><button @click="showSystemAudioHelp = false" class="btn btn--primary">Got it</button>