Your personal voice-enabled virtual assistant
An interactive voice-enabled virtual assistant built with HTML, CSS, and JavaScript that responds to voice commands and provides spoken feedback.
Lee Chong Wei is a virtual assistant that leverages the Web Speech API to provide hands-free interaction. Users can speak commands to the assistant, which will respond verbally and perform various tasks like opening websites, telling time, and searching the web.
This project demonstrates the power of web-based voice technologies and provides an accessible interface for users who prefer voice interaction over traditional input methods.
- Hands-Free Operation: Control your computer without touching the keyboard or mouse
- Accessibility: Useful for users with mobility or vision impairments
- Convenience: Quick access to information and applications
- Learning Tool: Demonstrates modern web APIs in action
- π€ Voice Recognition: Uses the Web Speech API to listen and interpret user commands
- π Voice Synthesis: Provides spoken responses using text-to-speech capabilities
- β° Time & Date: Tells current time and date on request
- π Website Launcher: Opens popular websites (YouTube, Google, Facebook, Instagram)
- βοΈ Application Opener: Launches system applications (Calculator, WhatsApp, Gmail)
- π Web Search: Searches Google for queries not directly recognized
- π Contextual Greetings: Greets users differently based on time of day (Morning, Afternoon, Evening)
- A modern web browser (Chrome recommended for best Web Speech API support)
- Internet connection for CDN resources and web searches
- Microphone access (browser will prompt for permission)
Simply open index.html
in your browser to start using the assistant immediately!
- Direct Download: Download the ZIP file from GitHub and extract it
- Git Clone:
git clone https://github.com/codergangganesh/DLCO-project_1-lee-AI-Bot.git
- GitHub CLI:
gh repo clone codergangganesh/DLCO-project_1-lee-AI-Bot
- Click the "Click here for talk to me" button
- Speak your command clearly when the microphone activates
- Listen to the verbal response from the assistant
Note: On first use, your browser may ask for microphone permission. Please allow access for the voice recognition to work.
Command | Action |
---|---|
"Hello" or "Hey Lee" | Greets the user |
"Who are you?" or "What is your name?" | Introduces the assistant |
"Open YouTube/Google/Facebook/Instagram" | Opens the respective website |
"Open Calculator/WhatsApp/Gmail" | Launches the respective application |
"What time is it?" or "Time" | Tells the current time |
"What date is it?" or "Date" | Tells the current date |
Any other phrase | Performs a Google search |
-
User: "Hey Lee, what time is it?"
-
Lee: "It's 3:45 PM"
-
User: "Lee, open YouTube"
-
Lee: "Opening YouTube..." (Opens YouTube in a new tab)
-
User: "Who are you?"
-
Lee: "My name is Lee Chong Wei, a virtual assistant created by Team Vishnu Sir"
- Frontend: HTML5, CSS3, JavaScript ES6+
- APIs: Web Speech API (SpeechRecognition & SpeechSynthesis)
- Fonts: Google Fonts ('Protest Guerrilla')
- Graphics: Custom logo and animated voice indicator
- HTML5 Semantic Elements: For structuring the interface
- CSS3 Flexbox: For responsive layout design
- CSS3 Animations: For interactive button effects
- JavaScript ES6+: For modern syntax and functionality
- Web Speech API: For voice recognition and synthesis
DLCO project_1(lee AI Bot)/
βββ index.html # Main HTML structure
βββ style.css # Styling and animations
βββ script.js # Core functionality and logic
βββ logo.jpg # Assistant logo
βββ voice.gif # Animated voice indicator
βββ mic.svg # Microphone icon
- index.html: The main interface with the assistant's visual elements
- style.css: Responsive design with gradient buttons and animations
- script.js: Implements the Web Speech API and command processing logic
The Web Speech API has varying support across different browsers:
Browser | Speech Recognition | Speech Synthesis |
---|---|---|
Chrome | β Supported | β Supported |
Firefox | β Supported | |
Safari | β Not Supported | β Supported |
Edge | β Supported | β Supported |
Note: For the best experience, use Google Chrome as it has the most comprehensive support for the Web Speech API.
- Android: Chrome Mobile fully supports both speech recognition and synthesis
- iOS: Safari on iOS has limited support; Chrome recommended
The virtual assistant interface with voice activation button
- Dark theme interface for reduced eye strain
- Gradient button with hover effects
- Animated voice indicator during speech recognition
- Responsive layout that works on different screen sizes
- Initialization: On page load, the assistant greets the user based on the time of day
- Voice Input: Clicking the button activates the microphone for voice input
- Command Processing: The assistant analyzes the spoken command
- Action Execution: Based on the command, it performs the appropriate action
- Verbal Response: The assistant provides spoken feedback to the user
The application uses two main components of the Web Speech API:
- SpeechRecognition: Converts spoken words into text
- SpeechSynthesis: Converts text into spoken words
When a command is received, the system:
- Normalizes the input text to lowercase
- Matches against predefined command patterns
- Executes the corresponding action
- Generates a verbal response using text-to-speech
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
- Add more voice commands
- Implement natural language processing
- Improve error handling
- Add multilingual support
- Enhance UI/UX design
Please ensure your code follows the existing style and includes appropriate comments.
Mannam Ganesh Babu - Initial Work - codergangganesh
Project maintained by Team Vishnu
-
Microphone not working:
- Check browser permissions for microphone access
- Ensure your microphone is properly connected
- Try refreshing the page
-
Voice recognition not responding:
- Make sure you're using a supported browser (Chrome recommended)
- Speak clearly and at a moderate pace
- Check your internet connection
-
Voice synthesis not working:
- Verify your system audio is functioning
- Check that your browser supports SpeechSynthesis
- Chrome: Go to Settings > Privacy and security > Site Settings > Microphone
- Firefox: May require additional configuration for speech recognition
- Safari: Speech recognition is not supporte
- Thanks to Team Vishnu for creating this virtual assistant
- Inspired by modern voice assistant technologies
- Powered by Web Speech API
If you encounter any issues or have questions about this project, please open an issue on GitHub.
β If you find this project helpful, please consider giving it a star!
Made with β€οΈ by Mannam Ganesh Babu and Team Vishnu