A web application for lung sound analysis that processes multi-channel audio recordings to detect and visualize crackle families
- Upload and analyze multi-channel WAV files
- Upload individual channel WAV files that will be combined for analysis
- Visualize detected crackle families
- View detailed cross-correlation data
- Access the application from other devices on the local network
- Node.js (v14+)
- Python 3.6+
- Required Python libraries: librosa, numpy, scipy, soundfile
-
Fork and Clone the repository on your local machine:
git clone https://github.com/yourusername/lung-detect.git cd lung-detect -
Install Node.js dependencies:
npm install -
Install Python dependencies:
pip install librosa numpy scipy soundfile matplotlib -
Create uploads directory if it doesn't exist:
mkdir -p public/data/uploads
- Install dependencies:
npm install
-
Start the backend server:
node server -
Start the frontend development server:
npm start -
Access the application:
- Locally:
http://localhost:3000 - From other devices on the network:
http://YOUR_IP_ADDRESS:3000
- Locally:
-
Build the frontend:
npm run build -
Install a static file server:
npm install -g serve -
Serve the built files:
serve -s build -l 3000 -
Start the backend server:
node server -
Access the application:
- Locally:
http://localhost:3000 - From other devices on the network:
http://YOUR_IP_ADDRESS:3000
- Locally:
To allow other computers on your local network to access the application:
-
Find your computer's IP address:
- On macOS/Linux:
ifconfigorip addr - On Windows:
ipconfig
- On macOS/Linux:
-
Make sure your firewall allows incoming connections on ports 3000 (frontend) and 5000 (backend)
-
Other computers on the network can access your app at:
http://YOUR_IP_ADDRESS:3000
lung-detect/
├── backend/
│ ├── audio_process.py # Main audio processing script
│ ├── combine_wav.py # Script to combine multiple WAV files
│ ├── server.js # Express backend server
│ ├── public/data/
│ │ └── uploads/ # Upload directory (not tracked in git)
├── src/
│ ├── components/
│ │ ├── LungVisualization.js
│ │ ├── MultiUploadContainer.js
│ │ ├── UploadContainer.js
│ │ └── ...
│ ├── App.js
│ ├── config.js
│ └── ...
- The application defaults to using port 5000 for the backend API and port 3000 for the frontend
- All uploaded files are temporarily stored in
public/data/uploads/ - Log files are not tracked in git but instead will be stored in
backend/public/data/uploadsin your local setup