feat: add meeting transcription for macOS#788
Conversation
- Add electron-audio-loopback package for system audio capture - Create MeetingRecorder class to capture mic + system audio - Add createMeetingTranscription TIPC route - Create Meeting Transcription UI page and navigation - Requires macOS 12.3+ for system audio capture via Chromium loopback
🤖 Augment PR SummarySummary: Adds a macOS-only “Meeting Transcription” flow that records both microphone input and system (loopback) audio, then transcribes the combined recording via the existing STT providers. Changes:
Technical Notes: Requires macOS 12.3+ and Screen Recording permission; system audio capture uses 🤖 Was this summary useful? React with 👍 or 👎 |
| // Must be called before app.whenReady() | ||
| import { initMain as initAudioLoopback } from "electron-audio-loopback" | ||
| if (process.platform === "darwin") { | ||
| initAudioLoopback() |
There was a problem hiding this comment.
| if (this.mediaRecorder && this.mediaRecorder.state !== "inactive") { | ||
| this.mediaRecorder.stop() | ||
| } | ||
| this.cleanup() |
There was a problem hiding this comment.
stopRecording() calls cleanup() immediately after MediaRecorder.stop(), which stops tracks/closes the AudioContext and also nulls this.mediaRecorder before onstop runs; this can lead to truncated/empty blobs and losing the recorder mimeType (also makes the existing empty-blob warning more likely).
🤖 Was this useful? React with 👍 or 👎
| } | ||
| }) | ||
|
|
||
| recorder.on("error", (err) => { |
| icon: "i-mingcute-server-line", | ||
| }, | ||
| { | ||
| text: "Meeting", |
- Guard initAudioLoopback() with try-catch to prevent app crash on init failure - Fix stopRecording() cleanup timing to avoid truncating recordings - Clear duration interval in error handler to prevent timer from continuing - Hide Meeting nav link on non-macOS platforms Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
augment review |
| audioBitsPerSecond: 128000, | ||
| }) | ||
|
|
||
| let audioChunks: Blob[] = [] |
There was a problem hiding this comment.
Since meetings can be long, buffering all audioChunks in memory until onstop can grow large and risk OOM/hangs in the renderer. Consider adding some kind of duration/size guard or incremental persistence (also applies to the later blob.arrayBuffer() IPC transfer).
🤖 Was this useful? React with 👍 or 👎
- Add maximum recording duration limit (2 hours) - Add maximum recording size limit (500 MB) - Emit 'max-duration-reached' event when limits are reached - Auto-stop recording and save transcription when limits are hit - Clear duration check interval on cleanup Addresses PR review feedback about OOM risk for long meetings. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
augment review |
Summary
Adds meeting transcription functionality for macOS that captures both microphone audio (user's voice) and system audio (meeting participants from Zoom, Meet, Teams, etc.).
Changes
Core Implementation
UI
Requirements
How it Works
electron-audio-loopbackto enable Chromium's internal audio loopback flagsgetUserMedia()getDisplayMedia()with loopback enabledFiles Changed
apps/desktop/package.json- Added electron-audio-loopback dependencyapps/desktop/src/main/index.ts- Initialize audio loopback before app readyapps/desktop/src/main/tipc.ts- Added createMeetingTranscription routeapps/desktop/src/preload/index.ts- Exposed loopback IPC methodsapps/desktop/src/renderer/src/lib/meeting-recorder.ts- New MeetingRecorder classapps/desktop/src/renderer/src/components/meeting-transcription-panel.tsx- New UI componentapps/desktop/src/renderer/src/pages/meeting-transcription.tsx- New pageapps/desktop/src/renderer/src/router.tsx- Added routeapps/desktop/src/renderer/src/components/app-layout.tsx- Added nav linkPull Request opened by Augment Code with guidance from the PR author