SirenShield is a comprehensive women's safety application built with Django that provides real-time voice monitoring, emergency alerts, and location tracking to ensure user safety.
- Voice Monitoring: Real-time voice detection using speech recognition to identify emergency phrases like "help me"
- Emergency Alerts: Automatic notification system that sends alerts to emergency contacts with location details
- Location Tracking: GPS-based location tracking with fallback to IP geolocation
- Police Station Finder: Automatic detection of nearby police stations with navigation links
- Safety Mode: Active monitoring mode with continuous voice surveillance
- User Registration & Authentication: Secure user accounts with email-based authentication
- Emergency Contacts: Manage trusted contacts who receive emergency notifications
- Profile Management: User profiles with customizable notification preferences
- Guardian System: Support for guardian accounts to monitor multiple users
- Real-time Voice Processing: Server-side voice monitoring using Python speech recognition
- Email Notifications: Automated emergency emails with detailed location information
- Interactive Maps: Integration with OpenStreetMap for police station locations
- Responsive UI: Modern, mobile-friendly interface built with Bootstrap
- Backend: Django 5.2, Python 3.13
- Database: SQLite (development), PostgreSQL (production ready)
- Voice Recognition: SpeechRecognition library
- Maps: OpenStreetMap API, Leaflet.js
- Frontend: HTML5, CSS3, JavaScript, Bootstrap 5
- Authentication: Django Allauth
Before running this application, make sure you have:
- Python 3.8 or higher
- pip (Python package installer)
- Git
- A microphone for voice testing
- Email service for notifications (Gmail recommended)
git clone https://github.com/yourusername/sirenshield.git
cd sirenshield
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
pip install -r requirements.txt
Create a .env
file in the project root:
SECRET_KEY=your-secret-key-here
DEBUG=True
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
DEFAULT_FROM_EMAIL=your-email@gmail.com
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
The application will be available at http://127.0.0.1:8000/
- Visit the registration page and create an account
- Verify your email address
- Complete your profile setup
- Navigate to your profile
- Add trusted contacts (family, friends, neighbors)
- Ensure they have valid email addresses
- Go to the Safety Mode page
- Click "Activate Safety Mode"
- The system will start voice monitoring
- When you say "help me" clearly, the system will:
- Detect the emergency phrase
- Send email alerts to your emergency contacts
- Open navigation to the nearest police station
- Display emergency notifications
- Use the "Deactivate Safety Mode" button to stop monitoring
To enable email notifications, configure your email settings in settings.py
:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'your-email@gmail.com'
EMAIL_HOST_PASSWORD = 'your-app-password'
The voice monitoring sensitivity can be adjusted in core/voice_monitor.py
:
# Adjust timeout and phrase detection settings
timeout = 5 # seconds to wait for phrase
phrase_timeout = 3 # seconds to wait for phrase completion
python manage.py test_location
python manage.py test_voice_monitor
- Activate safety mode
- Say "help me" clearly into your microphone
- Check that emergency alerts are sent
- Verify email notifications are received
SirenShield_pro/
βββ core/ # Main application
β βββ models.py # Database models
β βββ views.py # View functions
β βββ voice_monitor.py # Voice monitoring logic
β βββ voice_detection.py # Speech recognition
β βββ management/ # Custom management commands
βββ sireshield/ # Django project settings
βββ templates/ # HTML templates
βββ static/ # Static files (CSS, JS, images)
βββ media/ # User uploaded files
βββ requirements.txt # Python dependencies
βββ README.md # This file
- Authentication: Secure user authentication with Django Allauth
- CSRF Protection: Built-in CSRF protection for all forms
- Input Validation: Comprehensive input validation and sanitization
- Secure Headers: Security headers configured for production
- Environment Variables: Sensitive data stored in environment variables
- Set
DEBUG = False
in settings - Configure a production database (PostgreSQL recommended)
- Set up a production web server (Nginx + Gunicorn)
- Configure static file serving
- Set up SSL certificates
- Configure email service for production
# Build and run with Docker
docker build -t sirenshield .
docker run -p 8000:8000 sirenshield
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Contact the development team
- Django community for the excellent framework
- SpeechRecognition library for voice processing
- OpenStreetMap for mapping services
- Bootstrap for the responsive UI components
- v1.0.0 - Initial release with core safety features
- v1.1.0 - Added voice monitoring and emergency alerts
- v1.2.0 - Enhanced location tracking and police station finder
- v1.3.0 - Improved UI and notification system