openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

micd: scale sound volume with ambient noise level

Open incognitojam opened this issue 3 years ago • 0 comments

  • adds sounddevice pypi package (depends on libportaudio2 added in agnos 6.2)
  • micd calculates filteredAmbientNoiseLevel, published in microphone msg

Needs:

  • https://github.com/commaai/cereal/pull/382

Closes #23084

incognitojam avatar Nov 07 '22 19:11 incognitojam

sounddevice.query_devices(kind='input')
{'name': 'default', 'index': 36, 'hostapi': 0, 'max_input_channels': 32, 'max_output_channels': 32, 'default_low_input_latency': 0.008684807256235827, 'default_low_output_latency': 0.008684807256235827, 'default_high_input_latency': 0.034807256235827665, 'default_high_output_latency': 0.034807256235827665, 'default_samplerate': 44100.0}

Can get mic on (hw:0,0)

incognitojam avatar Nov 08 '22 23:11 incognitojam