Raspberry Pi 4 ReSpeaker Intelligent Speech Recognition 2 Microphone
Product Link
Introduction
The ReSpeaker 2-Mics Pi HAT is a Raspberry Pi dual microphone expansion board designed for AI and voice applications. This means you can build a more powerful and flexible voice product with integrated Amazona voice services and more.
The board is based on a low-power stereo codec developed on the WM8960. There are two microphones on either side of the board to capture sound, and it also provides three APA102 RGB LEDs, a user button, and two on-board Grove interfaces for expanding applications. In addition, either a 3.5mm audio jack or a JST 2.0 speaker output is available for audio output.
Features
Raspberry Pi compatible (supports Raspberry Pi Zero and Zero W, Raspberry Pi B +, Raspberry Pi 2 B and Raspberry Pi 3 B, Raspberry Pi 4 B, Raspberry Pi 3 B +)
2 Microphones
2 Grove interfaces
1 customizable button
3.5mm audio interface
JST2.0 audio output connector
Specifications
Pinout

Buttons: User-defined buttons connected to GPIO17
MIC_L & MIC_R: one microphone on the left and one on the right
RGB LEDs: 3 APA102 RGB LEDs connected to the Raspberry Pi's SPI interface
WM8960: Low-power stereo codec
Raspberry Pi 40-pin header: supports Raspberry Pi Zero, Raspberry Pi 1 B +, Raspberry Pi 2 B and Raspberry Pi 3 B
POWER: Micro USB port for powering the ReSpeaker 2-Mics Pi HAT, please power the board to provide enough current when using the speakers.
I2C: Grove I2C port, connects to I2C-1 GPIO12: Grove digital port, connects to GPIO12 and GPIO13
JST 2.0 SPEAKER OUT: For connecting to speakers, JST 2.0 connector
3.5mm AUDIO JACK: for connecting headphones or speakers with a 3.5mm audio plug
How to Use
System configuration and driver installation
Step 1 Insert ReSpeaker 2-Mics Pi HAT into Raspberry Pi
Insert the ReSpeaker 2-Mics Pi HAT into the Raspberry Pi, making sure the pins are aligned when inserting the Raspberry Pi.
!!!Note


step 2. burn system, log in, change source
Since the current Pi kernel does not currently support the wm8960 codec, we need to build it manually.
Make sure you are running the latest Raspbian operating system (debian 9) on your Pi, you can use etcher for system burn-in!
You can use VNC or PUTTY to connect to the Raspberry Pi, but please configure the wifi beforehand!
Before installing the driver, please switch the source to Tsinghua according to the following procedure.
If you are commenting out the contents of the original file with #, replace it with the following:
!!!Note
Step 3. Download and install the driver Run the following command
!!!Note
Step 4. Check that the sound card name matches the source code seeed-voicecard.
Audio playback tests
Step 1. Recording Test You can record with arecord and play it back with aplay: (don't forget to plug in headphones or speakers).
It can also be tested by audacity software. After opening Audacity, select AC108 and 2 channels as inputs and bcm2835 alsa: - (hw: 0, 0) as outputs to test:

Step 2. Adjust the volume (can be skipped)
alsamixer is a graphical mixer program for configuring sound settings and adjusting volume, Advanced Linux Sound Architecture (ALSA).

!!!Note
The left and right arrow keys are used to select a channel or device, and the "up and down arrows" control the volume of the currently selected device. To exit the programme use ALT + Q or press Esc. More information
Example of controlling an APA102 LED
Each on-board APA102 LED has an additional driver chip which sets the colour of the LED and then maintains that colour until a new command is received.

Please open SPI before execution as follows.
After configuration, you can run the led example by executing the following command line
How to use user-defined buttons
There is a user-defined button on the top of the board that connects to GPIO17. We can call python and RPi.GPIO to read the state。
Save the code as button.py, then run it. It should display "on" when you press the button:
FAQ
Last updated
Was this helpful?
