An innovative Public Announcement System that broadcasts messages in multiple languages simultaneously with real-time text-to-speech audio generation.
๐ Live Demo: View Live App (Replace with your actual URL)
- ๐ Multi-Language Support - Broadcast in 5 languages (English, Hindi, Spanish, French, Tamil)
- ๐ Text-to-Speech - Automatic audio generation using Google TTS
- โก Real-Time Broadcasting - WebSocket-based instant delivery to all clients
- ๐จ Priority Levels - Normal, Warning, and Emergency modes with visual alerts
- ๐ฑ Mobile Responsive - Works on all devices (desktop, tablet, mobile)
- ๐ Secure Authentication - Protected admin dashboard with login
- ๐ท Smart QR Code - Auto-generates QR code with deployment URL
- ๐ Announcement History - View and replay past announcements
- ๐ Replay Functionality - Re-broadcast previous announcements
- ๐๏ธ Clear History - Admin can clear all history and audio files
- ๐จ Visual Emergency Alerts - Blinking animations for emergency broadcasts
- ๐พ Auto-Save Drafts - Automatically saves admin drafts in browser
- โจ๏ธ Keyboard Shortcuts - Ctrl+Enter to broadcast quickly
Live URL: https://pa-system.onrender.com (Update with your actual Render URL)
Access Points:
- Home: https://pa-system.onrender.com
- Admin Login: https://pa-system.onrender.com/login
- Client Display: https://pa-system.onrender.com/client (No login required)
- History: https://pa-system.onrender.com/history
Admin Credentials:
- Username:
admin - Password: Contact admin for credentials
- Python 3.11+
- pip (Python package manager)
- Clone the Repository
git clone https://github.com/YOUR_USERNAME/pa-system.git
cd pa-system- Create Virtual Environment (Recommended)
# Windows
python -m venv venv
venv\Scripts\activate
# Mac/Linux
python3 -m venv venv
source venv/bin/activate- Install Dependencies
pip install -r requirements.txtpython app.pyThe server will start at http://localhost:5000
- Home Page: http://localhost:5000
- Admin Login: http://localhost:5000/login (Username:
admin, Password:admin123) - Client Display: http://localhost:5000/client
- History: http://localhost:5000/history
-
Login to Admin Dashboard
- Visit
/login - Enter your credentials
- Access granted to admin dashboard
- Visit
-
Broadcast Announcement
- Type your announcement in the text box
- Select priority level (Normal/Warning/Emergency)
- Choose target languages
- Click "Broadcast Announcement"
-
Share Access
- Share the QR code (automatically shows your deployment URL)
- Or share the client URL directly
- Clients can access without login
-
Manage History
- View all announcements in History page
- Replay any previous announcement
- Clear history when needed (admin only)
-
Access Client Display
- Visit
/clientURL or scan QR code - No login required - instant access
- Visit
-
Receive Announcements
- Select your preferred language
- Wait for announcements
- Audio plays automatically (ensure sound is enabled)
-
View All Languages
- See announcements in all translated languages
- Switch language anytime
- Visit the History page at
/history - View all past announcements
- Click "Replay" to re-broadcast any announcement
- Click "Play" to listen to specific language audio
- Click "Clear All" to delete history and free up space (requires admin login)
pa-system/
โโโ app.py # Main Flask application
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
โ
โโโ templates/ # HTML templates
โ โโโ index.html # Home page
โ โโโ admin.html # Admin dashboard
โ โโโ client.html # Client display
โ โโโ history.html # Announcement history
โ
โโโ static/ # Static files
โ โโโ style.css # Main stylesheet
โ โโโ admin.js # Admin functionality
โ โโโ client.js # Client functionality
โ โโโ history.js # History functionality
โ โโโ audio/ # Generated audio files (auto-created)
โ โโโ qr/ # QR code images (auto-created)
- Flask 3.0.0 - Web framework
- Flask-SocketIO 5.3.6 - WebSocket support for real-time communication
- Flask-Login 0.6.3 - User authentication and session management
- deep-translator 1.11.4 - Translation API (Google Translate wrapper)
- gTTS 2.5.3 - Google Text-to-Speech
- qrcode 7.4.2 - QR code generation
- Pillow - Image processing
- Gunicorn 21.2.0 - Production WSGI server
- HTML5 - Semantic structure
- CSS3 - Modern styling with gradients and animations
- JavaScript ES6 - Client-side logic
- Socket.IO Client 4.6.0 - WebSocket client for real-time communication
- Render.com - Cloud hosting platform (free tier)
- GitHub - Version control and CI/CD
- Gunicorn + Threading - Production server configuration
- Broadcast announcements to diverse linguistic audiences
- Emergency evacuation instructions
- Schedule updates and announcements
- Train/bus station announcements
- Flight information
- Safety instructions
- Campus-wide announcements
- Emergency alerts
- Event notifications
- Promotional announcements
- Emergency alerts
- Lost and found notifications
- Disaster management
- Evacuation instructions
- Safety guidelines
This project is configured for easy deployment on Render.com:
-
Push to GitHub
git init git add . git commit -m "Initial commit" git push origin main
-
Deploy on Render
- Go to render.com
- Click "New +" โ "Web Service"
- Connect your GitHub repository
- Render auto-detects configuration from
render.yaml - Click "Create Web Service"
- Wait 3-5 minutes for deployment
-
Configure Environment Variables (Important!)
- In Render Dashboard โ Environment
- Add
ADMIN_PASSWORD= your_secure_password - Save changes
-
Your App is Live!
- Access at:
https://your-app.onrender.com - Login at:
https://your-app.onrender.com/login
- Access at:
- Railway.app - Quick deploy with CLI
- Fly.io - Global edge deployment
- See
DEPLOYMENT_GUIDE.mdfor detailed instructions
For Production (Recommended):
Set environment variables on your deployment platform:
ADMIN_USERNAME- Your admin usernameADMIN_PASSWORD- Your secure password
For Local Development:
Edit app.py line ~35:
users = {
'your_username': User('1', 'your_username', generate_password_hash('your_password'))
}Edit app.py and add to LANGUAGES dictionary:
LANGUAGES = {
'en': {'name': 'English', 'flag': '๐ฌ๐ง'},
'hi': {'name': 'เคนเคฟเคจเฅเคฆเฅ (Hindi)', 'flag': '๐ฎ๐ณ'},
'de': {'name': 'Deutsch (German)', 'flag': '๐ฉ๐ช'},
# Add more languages here
}Create .env file for local development:
SECRET_KEY=your-random-secret-key
ADMIN_USERNAME=admin
ADMIN_PASSWORD=your_password- Visit the client URL:
https://your-app.onrender.com/client - Or scan the QR code from Admin Dashboard (automatically shows deployment URL)
- No login required - instant access
- Works from anywhere in the world!
- Ensure your device is on the same WiFi network
- Find your computer's IP address:
- Windows:
ipconfig - Mac/Linux:
ifconfig
- Windows:
- Access via
http://[YOUR-IP]:5000/client - Or scan the QR code (automatically detects local IP)
- Admin dashboard protected with Flask-Login
- Password hashing using Werkzeug
- Session management with secure cookies
- Client access remains public (no login required)
- Clear history requires admin authentication
- โ Change default admin password via environment variables
- โ Set strong SECRET_KEY
- โ Use HTTPS (automatic on Render/Railway/Fly.io)
- โ
Never commit
.envfile to Git - โ Regularly update dependencies
Audio Not Playing
- Cause: Browser autoplay policy
- Solution: Click anywhere on the page first, or use the sound toggle
Translation Fails
- Cause: Internet connection required
- Solution: Check internet connection, wait a moment and retry
Port 5000 Already in Use
- Cause: Another application using the port
- Solution: Kill the process or change port in
app.py
Import Errors
- Cause: Missing dependencies
- Solution: Activate venv and run
pip install -r requirements.txt
Build Fails on Render
- Cause: Python version incompatibility
- Solution: Ensure
runtime.txtspecifiespython-3.11.0
WebSocket Not Working After Deploy
- Cause: Incorrect start command
- Solution: Update Render start command to:
gunicorn --workers 1 --threads 4 --timeout 120 app:app
QR Code Shows Wrong URL
- Cause: RENDER_EXTERNAL_URL not detected
- Solution: Already fixed! App auto-detects deployment URL
Can't Login After Deploy
- Cause: Admin password not set
- Solution: Set
ADMIN_PASSWORDin Render environment variables
For detailed troubleshooting, see TROUBLESHOOTING.md
- Multiple user roles (Admin, Moderator, Broadcaster)
- Voice input for announcements (speech-to-text)
- Image/video announcements
- SMS/Email notifications for critical alerts
- Analytics dashboard with broadcast statistics
- Database storage (PostgreSQL/MongoDB) for persistent history
- Password recovery via email
- Two-factor authentication
- API rate limiting for security
- Docker containerization
- Custom TTS voice selection
- Geolocation-based targeting
- Mobile native apps (iOS/Android)
- โ User authentication with Flask-Login
- โ Secure admin dashboard
- โ Cloud deployment ready (Render.com)
- โ Smart QR code with auto-detection
- โ Clear history functionality
- โ Production-ready configuration
This is an open-source project. Contributions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Add more language support
- Improve UI/UX design
- Add database integration
- Implement additional security features
- Write tests
- Improve documentation
This project is open source and available for educational purposes.
Developed by: Chitransh Singh
GitHub: @ChitranshSingh
Project: Hackathon 2025
- Google Translate API for translations
- Google Text-to-Speech for audio generation
- Socket.IO for real-time communication
- Flask community for excellent documentation
- Render.com for free hosting
- Google Translate API for translations
- Google Text-to-Speech for audio generation
- Socket.IO for real-time communication
- Flask community for excellent documentation
- Keep messages concise - Shorter messages translate better and faster
- Test audio first - Always test audio playback before important broadcasts
- Use priority wisely - Reserve Emergency for critical situations only
- Change default password - Update credentials in production immediately
- Monitor history - Review past announcements for consistency
- Clear old history - Free up disk space by clearing old announcements periodically
- Share QR code - Print and display QR code at venue for easy access
- Test before event - Do a test broadcast 30 minutes before
- Have backup - Keep written announcements as backup
- Verify internet - Ensure stable internet for translation service
- Multiple devices - Test on different devices and browsers
- Use environment variables - Never hardcode passwords
- Enable HTTPS - Automatic on Render/Railway/Fly.io
- Monitor logs - Check Render/Railway logs for issues
- Set up alerts - Get notified if service goes down
- Regular backups - Export important announcements from history
๐ฏ Perfect for festivals, events, emergencies, and any situation requiring inclusive multi-language communication!
- Issues: GitHub Issues
- Documentation: See
DEPLOYMENT_GUIDE.md,AUTHENTICATION.md, and other guides in the repository - Deployment Help: Check Render documentation or Railway docs
If you find this project useful, please give it a star! โญ
Happy Broadcasting! ๐ข Bringing people together through language-inclusive technology! ๐