ArmDeveloperEcosystem / microphone-library-for-pico

Capture audio from a microphone on your Raspberry Pi Pico or any RP2040 based board. 🎤
Apache License 2.0
253 stars 50 forks source link

for examples/usb_microphone, set Gain to 1 to lower the background noise. #18

Closed Sasasu closed 1 year ago

Sasasu commented 2 years ago

Thanks to this project, make me able to make my own microphone with excellent sound quality without having to write code.

At first time, I tested many microphones, SPK0838HT4H has ~ -45dB background noise, MSM26D4040H11 has ~ -35dB, MSM261D4030H1C has ~ 33dB. I checked the DCDC power supply. and ask the resellers why those microphones have so much noise but no useful result

when I decide to port RNNoise to PI2040, I want to add a simple -25dB suppressor first. then I find this...

https://github.com/ArmDeveloperEcosystem/microphone-library-for-pico/blob/a837f633a6ad2bac268349df35d57e46e551f416/src/pdm_microphone.c#L96-L103

after add pdm_microphone_set_filter_gain(1); to the main function in examples/usb_microphone/main.c all microphones works perfect with < -90dB noise.

So please consider changing the default gain to 1.

* a picture of my microphone photo_2022-08-04_00-09-25

Sasasu commented 2 years ago

13

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

sandeepmistry commented 2 years ago

Hi @Sasasu,

Thank you for raising this topic, what do you think about adding a comment to the example instead of making the default gain 1. For example, something like:

// default gain is 16, uncomment the line below to set it to one:
// pdm_microphone_set_filter_gain(1); 
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.