Skip to content

Capture audio from a microphone on your Raspberry Pi Pico or any RP2040 based board. 🎤

License

Notifications You must be signed in to change notification settings

0x67757300/pico-microphone

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microphone Library for Pico

Capture audio from a microphone on your Raspberry Pi Pico or any RP2040 based board. 🎤

Hardware

Default Pinout

Analog Microphone

Raspberry Pi Pico / RP2040 Analog Microphone
3.3V VCC
GND GND
GPIO 26 OUT

PDM Microphone

Raspberry Pi Pico / RP2040 PDM Microphone
3.3V VCC
GND GND
GND SEL
GPIO 2 DAT
GPIO 3 CLK

GPIO pins are configurable in examples or API.

Examples

See examples folder.

Cloning

git clone https://github.com/ArmDeveloperEcosystem/microphone-library-for-pico.git 

Building

  1. Set up the Pico C/C++ SDK
  2. Set PICO_SDK_PATH
export PICO_SDK_PATH=/path/to/pico-sdk
  1. Create build dir, run cmake and make:
mkdir build
cd build
cmake -DPICO_BOARD=pico_w -DWIFI_SSID=<wifi_ssid> -DWIFI_PASSWORD=<wifi_password> -DSERVER=<server> -DPORT=<port> ..
make
  1. Copy example .uf2 to Pico when in BOOT mode.
  2. Listen
nc -lup <port> > audio.pcm
  1. Process
ffmpeg -f s16le -ar 16000 -ac 1 -i audio.pcm audio.wav

License

Apache-2.0 License

Acknowledgements

This project was created on behalf of the Arm Software Developers team, follow them on Twitter: @ArmSoftwareDev and YouTube: Arm Software Developers for more resources!

The OpenPDM2PCM library is used to filter raw PDM data into PCM. The TinyUSB library is used in the usb_microphone example.


Disclaimer: This is not an official Arm product.

About

Capture audio from a microphone on your Raspberry Pi Pico or any RP2040 based board. 🎤

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C 86.6%
  • CMake 13.4%