Example project to demonstrate the RNNoise audio noise suppression algorithm running on a Raspberry Pi Pico 2 board, using the RP2350's Cortex-M33 processor.
- RP2350 board
- Raspberry Pi Pico 2
- Microphones
| Raspberry Pi Pico 2 / RP2350 | PDM Microphone |
|---|---|
| 3.3V | VCC |
| GND | GND |
| GND | SEL |
| GPIO 21 | DAT |
| GPIO 20 | CLK |
Note: The GPIO pins for the microphone are configurable in the source code.
To control the noise suppression feature, use GPIO18:
- RNNoise Enabled (Default): Leave GPIO18 floating or pull it high.
- RNNoise Disabled (Bypass): Connect GPIO18 to GND. This is useful for quick A/B testing or if you want to use the microphone without filtering.
See examples folder.
git clone https://github.com/ArmDeveloperEcosystem/rnnoise-examples-for-pico-2.git- Set up the Pico C/C++ SDK
- Set
PICO_SDK_PATH
export PICO_SDK_PATH=/path/to/pico-sdk- Set Correct TinyUSB Version
This is a critical step. This project is tested and confirmed to work with TinyUSB version 0.17.0. Later versions (like 0.18.0) have API changes that break the build.
- Create
builddir, runcmakeandmake:
mkdir build
cd build
cmake .. -DPICO_BOARD=pico2
make
- Copy example
.uf2to Pico when in BOOT mode.
This project would not be possible without the incredible work from the open-source community.
- TinyUSB: For the robust and easy-to-use USB device stack.
- RNNoise: For the high-quality, low-footprint noise suppression library.
- ArmDeveloperEcosystem/microphone-library-for-pico: For the excellent PDM microphone driver and base examples.
Disclaimer: This is not an official Arm product.