VIA AI Transforma Model 1 ReSpeaker 2-Mics HAT Reference Guide Table of Contents Introduction ..............................1 Install and Setup the HAT ........................1 1.1.1 Configure Sound Settings with alsamixer ..................2 1.1.2 Configure Sound Settings with amixer ................... 4 1.1.3 Store Audio Settings ........................
1.1 Install and Setup the HAT 1. Mount the ReSpeaker 2-Mics HAT to the 40-pin headers on the VIA AI Transforma Model 1 board, making sure that the board is powered off and the pins are properly aligned when stacking the ReSpeaker 2-Mics HAT.
4. After rebooting, the ALSA (Advanced Linux Sound Architecture) mixer needs to be reconfigured in order for the microphone and audio output on the Respeaker 2-Mics HAT to work properly. There are two ways to configure the ALSA mixer settings, through the graphical program “alsamixer”, or through the command line tool “amixer”.
Page 7
VIA AI Transforma Model 1 ReSpeaker 2-Mics HAT Reference Guide 2. Use the left and right arrow keys on the keyboard to select “Left Output Mixer PCM”. Left Click on the "MM" icon to enable the left audio output channel.
VIA AI Transforma Model 1 ReSpeaker 2-Mics HAT Reference Guide 6. Press F3 to switch to the Playback menu and select "Headphone" to adjust its volume. 7. Quit the program by hitting the Esc key. 1.1.2 Configure Sound Settings with amixer The amixer command line tool is an alternative way to configure sound settings and adjust output volume.
VIA AI Transforma Model 1 ReSpeaker 2-Mics HAT Reference Guide 1.1.3 Store Audio Settings After configuring the audio settings with either of the tools above, use the “alsactl” command to store the audio settings: debian@transforma:~$ sudo alsactl store -f /var/lib/alsa/asound.state Load and apply the settings manually with the following command or reboot the system to automatically apply the settings.
2. Examples There are 4 examples under the “/usr/local/lib/python3.11/dist-packages/mic_hat”folder. 2.1 Download and Install Libraries Before running ReSpeaker 2-Mics HAT examples on the VIA AI Transforma board, users must download and install the necessary libraries and reference code. # Download necessary libraries...
VIA AI Transforma Model 1 ReSpeaker 2-Mics HAT Reference Guide 2.2 Example 1: APA102 RGB LEDs This example shows how to control the RGB LEDs on the board. Execute the following command to turn on the LEDs”: debian@transforma: /usr/local/lib/python3.11/dist-packages/mic_hat$ sudo python3 interfaces/ pixels.py...
VIA AI Transforma Model 1 ReSpeaker 2-Mics HAT Reference Guide 2.4 Example 3: Record Audio with the Microphone This example shows how to record audio with the microphones on this HAT to a file named“output.wav”under the same folder. You can change the recording parameters by modifying the source code. Execute the following command to record audio: debian@transforma: /usr/local/lib/python3.11/dist-packages/mic_hat$ sudo python3 recording_...
VIA AI Transforma Model 1 ReSpeaker 2-Mics HAT Reference Guide 3. References Details of this HAT could be acquired from: https://wiki.seeedstudio.com/ReSpeaker_2_Mics_Pi_HAT/ https://pinout.xyz/pinout/respeaker_2_mics_phat...
Page 14
Taiwan Headquarters Japan China 1F, 531 Zhong-zheng Road, 940 Mission Court 3-15-7 Ebisu MT Bldg. 6F, Tsinghua Science Park Bldg. 7 Xindian Dist., New Taipei City 231 Fremont, CA 94539, Higashi, Shibuya-ku No. 1 Zongguancun East Road, Taiwan Tokyo 150-0011 Haidian Dist., Beijing, 100084 Japan China...
Need help?
Do you have a question about the ReSpeaker 2-Mics HAT and is the answer not in the manual?
Questions and answers