https://github.com/hifiberry/alsaloop
An alsaloop implementation in Python with some additional features
https://github.com/hifiberry/alsaloop
Last synced: about 1 month ago
JSON representation
An alsaloop implementation in Python with some additional features
- Host: GitHub
- URL: https://github.com/hifiberry/alsaloop
- Owner: hifiberry
- License: mit
- Created: 2019-11-25T16:59:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-17T14:09:44.000Z (about 1 year ago)
- Last Synced: 2025-03-27T01:51:34.328Z (about 2 months ago)
- Language: Python
- Size: 35.2 KB
- Stars: 5
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Alsaloop
This package is responsible for detecting audio input in the HifiBerryOS system.
## Requirements
The `pyalsaaudio` package is used to read from and write to audio devices. This package does not work on Windows.## How it works
1. The input device is opened. It is read continuously.
2. When a certain number of samples have been read, the audio volume is calculated
3. If the audio was not playing, but one of the samples exceed the threshold volume, audio will start playing
4. If the audio was playing, but none of the samples exceed the threshold volume, audio will stop playing