A powerful, feature-rich voice-controlled assistant named Chanakya with a stunning web interface. Control your PC, manage applications, and execute commands using your voice or text input with beautiful animations and modern design.
- Voice Recognition - Advanced speech-to-text using Google Speech Recognition
- Text-to-Speech - Natural voice responses using pyttsx3
- Web Interface - Beautiful, modern UI with animations and real-time feedback
- Universal App Control - Open, close, and switch between ANY application on your PC
- System Management - Full control over system operations
- Open any installed application by name
- Close running applications
- List all open windows
- Switch between applications
- Dynamic system-wide app search
- Copy, Paste, Cut, Undo, Redo
- Save, Select All, Find, Print
- New Tab, Close Tab, Refresh
- Works across ALL applications
- Volume control (up, down, mute)
- Take screenshots
- Shutdown, restart, sleep/hibernate
- Lock computer
- Open Task Manager, Settings, Control Panel
- Window management (minimize, maximize)
- Google search
- Open popular websites (YouTube, Gmail, Facebook, etc.)
- Wikipedia search
- Create files and folders
- Take voice notes
- Automatic file management
- Tell jokes
- Get current time and date
- Battery status
- CPU usage monitoring
- Play music from your Music folder
- Python 3.7 or higher
- Windows OS (for system-specific features)
- Working microphone
- Internet connection (for voice recognition)
git clone https://github.com/yourusername/voice-assistant.git
cd voice-assistantpip install -r requirements.txtOr install manually:
pip install SpeechRecognition pyttsx3 PyAudio wikipedia-api pyautogui requests psutil FlaskOption 1: Web Interface (Recommended)
python app.pyThen open your browser to: http://localhost:5000
You'll see the beautiful Chanakya interface with animated avatar and controls!
Option 2: Command Line
python voice.pyThe Chanakya web interface features:
- 🌈 Stunning gradient background - Deep purple/blue gradient with animated floating orbs
- 💎 Glassmorphism design - Frosted glass container with backdrop blur effects
- 🎯 Large animated avatar - 250px circle with rotating rainbow border showcasing the Chanakya logo
- ✨ Smooth animations - Floating elements, pulsing buttons, gradient shifts
- 🎤 Interactive controls - Voice and text input with real-time feedback
- 🔮 Glowing effects - Container and title glow animations
- ⚡ Real-time status indicators - Dynamic status dots and text
- 📱 Responsive design - Perfect on all screen sizes
- 🔘 Quick action suggestions - Pre-built command buttons
- ✍️ Text input alternative - Type commands if you prefer
- 🎨 Premium color scheme - Purple, violet, and gold gradient theme
"Hello" / "Hi" (Chanakya will greet you)
"What's the time?"
"What's the date?"
"Who are you?" (Chanakya will introduce himself)
"Open [app name]"
Examples:
- "Open calculator"
- "Open Chrome"
- "Open Notepad"
- "Open Photoshop"
- "Open VS Code"
"Close [app name]"
"Close window" (closes current window)
Examples:
- "Close Chrome"
- "Close Notepad"
"List windows"
"Show windows"
"Switch to [app name]"
"Switch application"
"Minimize window"
"Maximize window"
"Copy"
"Paste"
"Cut"
"Undo"
"Redo"
"Save"
"Select all"
"Find"
"Print"
"New tab"
"Close tab"
"Refresh"
"Volume up"
"Volume down"
"Mute"
"Take screenshot"
"Shutdown"
"Restart"
"Sleep"
"Lock computer"
"Task manager"
"Open settings"
"Search for [query]"
"Google [query]"
"Open YouTube"
"Open Gmail"
"Open Facebook"
"Wikipedia" (then speak topic)
"Create file"
"Create folder"
"Take note" / "Write note"
"Tell me a joke"
"Play music"
"Battery" (laptop only)
"CPU"
"Exit"
"Quit"
"Goodbye"
voice/
│
├── app.py # Flask web application
├── voice.py # Command-line voice assistant
├── requirements.txt # Python dependencies
├── README.md # This file
│
├── templates/
│ └── index.html # Web interface HTML with Chanakya branding
│
└── static/
├── style.css # Premium animated CSS styling
├── script.js # Frontend JavaScript
└── logo.png # Chanakya logo
Edit the TTS engine properties in voice.py or app.py:
self.engine.setProperty('rate', 180) # Speech speed
self.engine.setProperty('volume', 1.0) # Volume (0.0 to 1.0)voices = self.engine.getProperty('voices')
self.engine.setProperty('voice', voices[0].id) # Male
# or
self.engine.setProperty('voice', voices[1].id) # FemaleIn app.py, change the port number:
app.run(debug=True, host='0.0.0.0', port=5000) # Change 5000 to your port- Check if your microphone is properly connected
- Ensure microphone permissions are enabled for Python
- Run the calibration again by restarting the application
On Windows, if PyAudio fails to install:
pip install pipwin
pipwin install pyaudioThe assistant searches common installation directories. If an app isn't found:
- Make sure it's installed
- Try using the full application name
- Check if the .exe is in your PATH
- Ensure Flask is installed:
pip install Flask - Check if port 5000 is available
- Try accessing
http://127.0.0.1:5000instead
Edit the quick_apps dictionary in handle_open_application():
quick_apps = {
"your_app": "path/to/your_app.exe",
}Add new conditions in the process_command() method:
elif "your command" in command:
# Your custom action
self.speak("Response message")Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your 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.
- Google Speech Recognition API for voice recognition
- pyttsx3 for text-to-speech
- Flask for the web framework
- Font Awesome for beautiful icons
- All open-source contributors
Chanakya is your intelligent voice assistant, named after the ancient Indian philosopher and strategist. Just like the wise Chanakya, this assistant helps you make smart decisions and control your digital world with wisdom and efficiency.
Made with ❤️ and 🎨 Premium Design
⭐ Star this repo if you find it helpful!
- Multiple language support
- Custom wake word ("Hey Chanakya")
- Integration with smart home devices
- Calendar and reminder management
- Email sending capabilities
- Weather API integration
- News API integration
- Spotify/Music streaming control
- Advanced AI conversation capabilities
- Mobile app version
- Voice customization options
- Theme customization in UI
This assistant requires microphone access and system permissions. Use responsibly and ensure you trust the code before granting such permissions.
Made with ❤️ by Punit Kumar
⭐ Star this repo if you find it helpful!
