Skip to content

Commit c76fdb9

Browse files
Improve Python 3.10+ compatibility and threading stability.
- Replace PyAudio callback mechanism with explicit threading due to callback reliability issues in Python 3.10+ where stream callbacks became less stable - Improve audio handling stability and error handling throughout AudioImpulseRunner - Add comprehensive type hints and documentation to audio and image modules - Document optional dependency installation patterns in README Python 3.10 introduced stricter threading behavior that caused PyAudio's callback-based approach to become unreliable, leading to audio capture failures. The new explicit threading approach provides better control and stability. Signed-off-by: Davide Colì <davide.coli@secomind.com>
1 parent 04d0445 commit c76fdb9

File tree

5 files changed

+503
-133
lines changed

5 files changed

+503
-133
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Fork Improvements
2+
3+
This is an improved fork of the original Edge Impulse Linux SDK that addresses several compatibility and usability issues:
4+
5+
- **Python 3.10+ Compatibility**: Fixed AudioImpulseRunner compatibility issues with Python 3.10 and newer versions by replacing PyAudio dependencies with more robust threading solutions
6+
- **Optional Dependencies**: Added `[image]` and `[audio]` optional dependency groups so you only install what you need:
7+
- `pip3 install edge_impulse_linux[audio]` - for audio classification projects
8+
- `pip3 install edge_impulse_linux[image]` - for computer vision projects
9+
- `pip3 install edge_impulse_linux[all]` - for both
10+
- **Improved Stability**: Enhanced threading and audio handling for better reliability across different Python versions
11+
12+
---
13+
114
# Edge Impulse Linux SDK for Python
215

316
This library lets you run machine learning models and collect sensor data on Linux machines using Python. This SDK is part of [Edge Impulse](https://www.edgeimpulse.com) where we enable developers to create the next generation of intelligent device solutions with embedded machine learning. [Start here to learn more and train your first model](https://docs.edgeimpulse.com).

src/edge_impulse_linux/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
from edge_impulse_linux import audio, image, runner

0 commit comments

Comments
 (0)