name: pull request about: submit changes to the project title: “[pr] fix noise cancellation being disabled on headphones” labels: ‘bug’ assignees: ‘@Anmol202005’


description

This PR fixes an issue where screenpipe would sometimes disable noise cancellation on headphones. The root cause was that we were using default audio configurations instead of the device’s native highest quality configuration, which could override device-specific features like noise cancellation.

Changes:

  • Modified get_cpal_device_and_config to use device’s highest quality supported configuration
  • Added proper handling of SupportedStreamConfigRange to preserve device features
  • Improved configuration selection logic to prioritize sample rate and channel count

related issue: #59

how to test

  1. Connect a pair of headphones with noise cancellation (like AirPods Pro, Sony WH-1000XM4, etc.)
  2. Start screenpipe and verify that noise cancellation remains active:
    • On macOS: Check the Control Center to see if noise cancellation is still enabled
    • On Windows: Check the device properties in Sound settings
    • On Linux: Check the device settings in your audio control panel
  3. Record some audio and verify that:
    • The noise cancellation remains active during recording
    • The audio quality is maintained
    • The device’s native features are preserved

/claim #59

Claim

Total prize pool $100
Total paid $0
Status Approved
Submitted May 02, 2025
Last updated May 02, 2025

Contributors

AN

Anmol Sharma

@Anmol202005

100%

Sponsors

ME

mediar.ai

@mediar-ai

$100 pending