This project provides extended drivers for ReSpeaker audio devices, specifically targeting Raspberry Pi 4 and 5. It's a fork of HinTak's fork of the official ReSpeaker drivers, with the goal of adding support for newer Raspberry Pi models and implementing diagnostics and tests.
- Compatibility: Optimized for Raspberry Pi 4 and 5
- Testing: Successfully tested basic I/O audio on Raspberry Pi 5 with ReSpeaker 2-Mics Pi HAT
- Environment:
- Debian GNU/Linux 12 (bookworm) - Latest version as of 2024-10-01
- Linux kernel: 6.6.51+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt2 (2024-10-01) aarch64 GNU/Linux
- Functionality: Supports audio recording and playback using ALSA
- ReSpeaker 2-Mics Pi HAT
- ReSpeaker 4-Mics Pi HAT
- ReSpeaker 6-Mics Circular Array Kit
- ReSpeaker 4-Mics Linear Array Kit
- Extended support for Raspberry Pi 4 and 5
- Utilizes default ALSA drivers for audio functionality
- Maintains compatibility with Seeed 2-mic voice card (ReSpeaker HAT)
- Includes an expanded menu for easy installation, uninstallation, and diagnostics
- Clone the repository:
git clone https://github.com/Wartem/seeed-voicecard
- Navigate to the project directory:
cd seeed-voicecard
- Run the expanded menu script:
sudo bash expanded_menu.sh
- Follow the on-screen instructions to install, uninstall, or run diagnostics.
- Clock configuration warning for WM8960 codec (does not affect basic functionality)
- LEDs are currently non-functional
If you encounter issues, try running the installation multiple times. This has been known to resolve some problems.
Uninstallation can be performed through the expanded menu. Please note that this feature is still in development and may not be fully functional.
This project is a work in progress and is considered experimental. While initial testing has shown promising results, we cannot guarantee full functionality or stability at this stage. We strongly recommend thorough testing before using this in any production environment.
The expanded_install.sh script builds upon the original install.sh as it runs it as one of the steps. It adds more functionality and user interaction. Here's a summary of what this expanded script does:
-
Checks for root privileges.
-
Defines helper functions for various tasks like checking module existence, updating configuration files, and removing existing overlays.
-
Offers the user a choice to update the system before installation, including options for a regular upgrade or a full upgrade.
-
Allows the user to select their specific ReSpeaker mic model (2, 4 or 6).
-
Performs pre-installation tasks:
- Ensures DKMS is installed
- Updates /etc/modules with required sound modules
- Updates the boot configuration file
- Copies necessary configuration files to /etc/voicecard
- Sets up the seeed-voicecard binary and service
-
Compiles and installs the driver twice (for redundancy):
- Builds dtbo (Device Tree Blob Overlay) files
- Compiles and installs the Seeed voicecard driver
- Builds and installs the specific dtbo file for the chosen mic model
- Removes existing overlays and sets up the new one
- Enables I2C and SPI interfaces
- Configures sound card modules and blacklists the default audio driver
- Adds the user to audio and i2c groups
- Updates the initramfs
-
Cleans up old dtbo files that aren't needed for the chosen model.
-
Offers the user a choice to reboot immediately or later.
-
Provides additional notes about potentially needing to run the installation twice for best results.
This expanded script aims to provide a comprehensive and user-friendly installation process for the Seeed ReSpeaker HAT, addressing potential issues that might arise due to system updates or specific hardware configurations.
This project builds upon the work of the original ReSpeaker driver developers and HinTak's fork. We extend our gratitude for their foundational work.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Up to date documentation for reSpeaker products can be found in Seeed Studio Wiki!
Estimate the magnitude squared coherence using Welch’s method.
Note: 'CO 1-2' means the coherence between channel 1 and channel 2.
# How to get the coherence of the captured audio(a.wav for example).
sudo apt install python-numpy python-scipy python-matplotlib
python tools/coherence.py a.wav
# Requirement of the input audio file:
- format: WAV(Microsoft) signed 16-bit PCM
- channels: >=2
For hardware testing purposes we made a Rasperry Pi OS 5.10.17-v7l+ 32-bit image with reSpeaker drivers pre-installed, which you can download by clicking on this link.
We provide official support for using reSpeaker with the following OS:
- 32-bit Raspberry Pi OS
- 64-bit Raspberry Pi OS
And following hardware platforms:
- Raspberry Pi 3 (all models), Raspberry Pi 4 (all models)
Anything beyond the scope of official support is considered to be community supported. Support for other OS/hardware platforms can be added, provided MOQ requirements can be met.
If you have a technical problem when using reSpeaker with one of the officially supported platforms/OS, feel free to create an issue on Github. For general questions or suggestions, please use Seeed forum.