agent-native icon indicating copy to clipboard operation
agent-native copied to clipboard

[WIP] Add Windows support for meeting audio transcription

Open shomix opened this issue 5 months ago • 9 comments

Summary

Extends the Clips desktop app's local Whisper meeting transcription from macOS-only to also support Windows, using cpal for WASAPI microphone and loopback system audio capture.

Problem

The meeting transcription feature (mic + system audio capture → local Whisper inference) was gated entirely behind #[cfg(target_os = "macos")], leaving Windows users with no meeting notes support despite the rest of the pipeline (detection, notifications, transcript rendering) already being cross-platform.

Solution

A new capture module provides a platform-dispatched abstraction over audio capture. macOS re-exports the existing proven backends (AVAudioEngine + ScreenCaptureKit). Windows uses cpal for both the microphone (default WASAPI input) and system audio (WASAPI loopback on the default output device). The Whisper engine (whisper_speech.rs) is updated to use this shared interface, making it platform-agnostic.

Key Changes

  • src/capture/mod.rs — new platform-dispatch module exposing start_raw_mic_capture, start_raw_system_capture, RawMicCapture, and RawSystemCapture for both macOS and Windows.
  • src/capture/macos.rs — thin re-exports of the existing native_speech and system_audio macOS backends under the shared capture contract.
  • src/capture/windows.rs — new Windows backend using cpal for WASAPI mic input and WASAPI loopback system audio; includes channel-downmix helpers and unit tests for mono/stereo/multi-channel conversion.
  • whisper_speech.rs — renamed inner macos module to engine, switched all #[cfg(target_os = "macos")] guards to #[cfg(any(target_os = "macos", target_os = "windows"))], and updated capture imports to use crate::capture.
  • system_audio.rs — added Windows branch to system_audio_version_status and system_audio_request_permission (WASAPI loopback needs no permission prompt).
  • Cargo.toml — added cpal = "0.15" as a Windows-only dependency; moved whisper-rs from the macOS-only block to a cfg(any(macos, windows)) target block.
  • CI workflows — added a Set up libclang for whisper-rs bindgen (Windows) step to both the build-check and release workflows, pointing LIBCLANG_PATH at the LLVM install (with a Chocolatey fallback) so whisper-rs bindgen compiles on Windows runners.
  • README.md — documented the macOS + Windows meeting transcription architecture and known Windows v1 limitations (no AEC, no sleep/call-ended auto-stop).

Edit in Builder  Preview


To clone this PR locally use the Github CLI with command gh pr checkout 1110

You can tag me at @builderio for anything you want me to fix or change

shomix avatar Jun 09 '26 14:06 shomix

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

github-actions[bot] avatar Jun 09 '26 14:06 github-actions[bot]

Deploy Preview for agent-native-scheduling failed. Why did it fail? →

Name Link
Latest commit 5fbbe3a3baecf1cdbf7cb1da02bfed1e4b232f2c
Latest deploy log https://app.netlify.com/projects/agent-native-scheduling/deploys/6a2828064dceae0008934255

netlify avatar Jun 09 '26 15:06 netlify

Deploy Preview for agent-native-meeting-notes failed. Why did it fail? →

Name Link
Latest commit 5fbbe3a3baecf1cdbf7cb1da02bfed1e4b232f2c
Latest deploy log https://app.netlify.com/projects/agent-native-meeting-notes/deploys/6a2828066a1d070008188053

netlify avatar Jun 09 '26 15:06 netlify

Deploy Preview for agent-native-design ready!

Name Link
Latest commit 5fbbe3a3baecf1cdbf7cb1da02bfed1e4b232f2c
Latest deploy log https://app.netlify.com/projects/agent-native-design/deploys/6a28280642c5550008e5712f
Deploy Preview https://deploy-preview-1110--agent-native-design.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify avatar Jun 09 '26 15:06 netlify

Deploy Preview for agent-native-voice failed. Why did it fail? →

Name Link
Latest commit 5fbbe3a3baecf1cdbf7cb1da02bfed1e4b232f2c
Latest deploy log https://app.netlify.com/projects/agent-native-voice/deploys/6a282806da6f2800082b3993

netlify avatar Jun 09 '26 15:06 netlify

Deploy Preview for agent-native-images ready!

Name Link
Latest commit 5fbbe3a3baecf1cdbf7cb1da02bfed1e4b232f2c
Latest deploy log https://app.netlify.com/projects/agent-native-images/deploys/6a28280683115b000885915c
Deploy Preview https://deploy-preview-1110--agent-native-images.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify avatar Jun 09 '26 15:06 netlify

Deploy Preview for agent-native-issues failed. Why did it fail? →

Name Link
Latest commit 5fbbe3a3baecf1cdbf7cb1da02bfed1e4b232f2c
Latest deploy log https://app.netlify.com/projects/agent-native-issues/deploys/6a282806dee3ac0008ce2640

netlify avatar Jun 09 '26 15:06 netlify

Deploy Preview for agent-native-brain ready!

Name Link
Latest commit 5fbbe3a3baecf1cdbf7cb1da02bfed1e4b232f2c
Latest deploy log https://app.netlify.com/projects/agent-native-brain/deploys/6a2828081d52530008812df5
Deploy Preview https://deploy-preview-1110--agent-native-brain.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify avatar Jun 09 '26 15:06 netlify

Deploy Preview for agent-native-recruiting failed. Why did it fail? →

Name Link
Latest commit 5fbbe3a3baecf1cdbf7cb1da02bfed1e4b232f2c
Latest deploy log https://app.netlify.com/projects/agent-native-recruiting/deploys/6a282807f1a5e600088e81eb

netlify avatar Jun 09 '26 15:06 netlify