https://github.com/openvoiceos/ovos-i2csound
Script for i2c HAT detection
https://github.com/openvoiceos/ovos-i2csound
Last synced: 9 months ago
JSON representation
Script for i2c HAT detection
- Host: GitHub
- URL: https://github.com/openvoiceos/ovos-i2csound
- Owner: OpenVoiceOS
- License: apache-2.0
- Created: 2023-12-20T23:12:10.000Z (about 2 years ago)
- Default Branch: dev
- Last Pushed: 2025-05-04T17:27:02.000Z (10 months ago)
- Last Synced: 2025-05-16T09:42:08.525Z (10 months ago)
- Language: Shell
- Size: 96.7 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ovos-i2csound
Script for i2c HAT detection and configuration on a Raspberry Pi
**Scripts in this repo require sudo access to use and install**
## Simple Installation
*currently only apt based OS*
Clone this repository.
`git clone https://github.com/OpenVoiceOS/ovos-i2csound`
Change into the `ovos-i2csound` directory.
`cd ovos-i2csound`
Run the install script.
`sudo ./install.sh`
Reboot for the changes to take effect.
## Installation Explained
This script does several things to enable auto detection of a variety of `i2c` sound cards for the Raspberry Pi. (A list of supported devices, or soon to be supported devices can be found in the `ovos-i2csound` script) [PR's are always welcome](https://github.com/OpenVoiceOS/ovos-i2csound/pulls/) to support more devices.
### install.sh
The `install.sh` script is an auto installer for `ovos-i2csound`. It will check for the required apt packages and install them if needed. It then copies the rest of the scripts used to the required directories on the host system. After installation, it is safe to delete this directory.
### Manual Installation
Place the following files in the respective directory, and reboot your system.
`i2c.conf` -> `/etc/modules-load.d/i2c.conf`
`bcm2835-alsa.conf` -> `/etc/modules-load.d/bcm2835-alsa.conf`
`i2csound.service` -> `/etc/systemd/system/i2csound.service`
`ovos-i2csound` -> `/usr/libexec/ovos-i2csound`
`99-i2c.rules` -> `/usr/lib/udev/rules.d/99-i2c.rules`
Create the directory for ovos-i2csound to store a variable in
`sudo mkdir /etc/OpenVoiceOS`
## Usage
When installed and enabled, this script will run at boot time and try to detect the attached card if any. If a supported card is detected, ovos-i2csound will setup Alsa to the correct values for that card.
Also, as an added feature, when a card is detected, a file will be created at `/etc/OpenVoiceOS/i2c_platform`. It contains a single line with the name of the card detected.
This file can be read and used as validation for plugins, or any other use you may find.
If the file does not exist, ovos-i2csound ran, but did not find a supported card.
Issues can be made [here](https://github.com/OpenVoiceOS/ovos-i2csound/issues/)