SafeSpace is an infrastructure for mental rest in women’s shelters. By using privacy-first, edge-based audio intelligence, it recognizes patterns like vocal tension and physical energy shifts. This provides a responsive environment where needs are heard without the social risk of speaking out. It reduces the weight of hyper-vigilance, allowing residents to move out of survival mode and reconnect with their own identity and wellbeing.
- Edge (Detection Device)
- Python
- openwakeword - wake word detection (hey jarvis)
- sounddevice - microphone audio recording
- tensorflow_hub + YAMNet - audio classification model (screaming, crying, glass, etc.)
- numpy - audio waveform processing
- librosa - audio utilities
- requests - sending HTTP alerts to the staff server
- threading - running Layer 1 and Layer 2 concurrently
- Python + Flask - web server and REST API endpoints (/register, /alert, /resolve)
- Flask-SocketIO - real-time WebSocket push to the browser dashboard
- Clone the repository.
- Run the staff dashboard:
cd staffpip install -r requirements.txtpython app.py - Run the edge device client:
cd edgepip install -r requirements.txtpython main.py
Note: The staff dashboard and the edge device client will run on different computers.
- Runs Python natively
- Built-in WiFi : connects directly to staff dashboard network
- Always-on audio capture, ultra low power draw
- Discreet form factor : mounts on any wall in any room
- Laptop microphones differ in sensitivity, directionality, and noise handling. Shelter environments have overlapping voices, echoes, and background noise that are not replicated.
- Training and testing data may not fully represent real distress signals across accents, languages, emotional intensity, or speaking styles.
For real-world shelter deployment, we plan to replace the laptop-based setup with a Raspberry Pi Zero 2 W + INMP441 MEMS Microphone (~$25–35 CAD per unit). This standalone sensor runs Python natively, connects over WiFi, and mounts discreetly on any wall. When a distress sound is detected, the alert flows directly from the sensor to the staff dashboard over the same network.