feat: add storage and training modules for snore detection

- Implemented `storage.py` for managing metadata storage, including sample addition, retrieval, and review state management.
- Created `training.py` for training a local model using Random Forest, including functions for training and predicting samples.
- Developed a web interface in `app.js` for capturing audio samples, managing labels, and training the model.
- Added HTML structure in `index.html` for the SnoreStopper control room with sections for sample capture, overnight gathering, training, and status display.
- Styled the application with `styles.css` to enhance user experience and interface aesthetics.
This commit is contained in:
2026-03-12 13:35:17 -04:00
commit 28012e70e0
21 changed files with 2680 additions and 0 deletions

28
pyproject.toml Normal file
View File

@@ -0,0 +1,28 @@
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "snorestopper"
version = "0.1.0"
description = "Self-hosted snore tracking and snore event detection"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"fastapi>=0.115,<1.0",
"uvicorn[standard]>=0.30,<1.0",
"numpy>=2.0,<3.0",
"sounddevice>=0.5,<1.0",
"soundfile>=0.12,<1.0",
"scipy>=1.13,<2.0",
"matplotlib>=3.9,<4.0",
"scikit-learn>=1.5,<2.0",
"joblib>=1.4,<2.0",
"python-multipart>=0.0.9,<1.0",
]
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]