Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vasu - Voice-Activated AI Assistant

A Python-based voice-activated AI assistant inspired by JARVIS. Vasu can open websites, play music, and fetch news headlines using simple voice commands.

Features

  • 🎤 Voice Recognition: Responds to the wake word "activate"
  • 🌐 Website Navigation: Opens popular websites with voice commands
  • 🎵 Music Player: Plays songs from your custom music library
  • 📰 News Updates: Fetches latest news headlines
  • 🔊 Text-to-Speech: Provides voice feedback for all actions

Supported Commands

Website Navigation

  • "Open Google"
  • "Open YouTube"
  • "Open Gmail"
  • "Open Stack Overflow"
  • "Open GitHub"
  • "Open LinkedIn"
  • "Open Facebook"
  • "Open Instagram"
  • "Open WhatsApp"
  • "Open Amazon"
  • "Open Flipkart"
  • "Open Reddit"
  • "Open Wikipedia"

Media & Information

  • "Play [song name]" - Plays songs from your music library
  • "News" - Opens latest news headlines

Prerequisites

  • Python 3.7 or higher
  • Working microphone
  • Internet connection
  • Speaker/audio output device

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/vasu-voice-assistant.git
    cd vasu-voice-assistant
  2. Install required dependencies

    pip install -r requirements.txt

    Or install manually:

    pip install speechrecognition
    pip install pyttsx3
    pip install pyaudio
    pip install requests

    Note for PyAudio installation issues:

    • Windows: Download the appropriate .whl file from here and install using pip install filename.whl
    • Linux: sudo apt-get install portaudio19-dev python3-pyaudio
    • macOS: brew install portaudio then pip install pyaudio
  3. Set up your music library

    • Edit musiclibrary.py to add your favorite songs
    • Add song names and YouTube URLs in the dictionary format

Usage

  1. Run the assistant

    python main.py
  2. Activate the assistant

    • Wait for "Listening...." to appear
    • Say "activate" to wake up the assistant
    • After hearing "Activated", give your command
    • Example: Say "Open YouTube" or "Play judas"
  3. Stop the assistant

    • Press Ctrl + C in the terminal

File Structure

vasu-voice-assistant/
│
├── main.py              # Main application file
├── musiclibrary.py      # Music library with song links
├── requirements.txt     # Project dependencies
└── README.md           # Project documentation

Customization

Adding More Songs

Edit musiclibrary.py and add songs in this format:

music = {
    "song_name": "youtube_url",
    "another_song": "youtube_url"
}

Adding Custom Commands

In main.py, add new conditions in the processCommand() function:

elif "your command" in c.lower():
    speak("Your response")
    # Your action here

Changing the Wake Word

Modify line 59 in main.py:

if (word.lower() == "your_wake_word"):

Troubleshooting

Microphone Not Detected

  • Check microphone permissions in your system settings
  • Ensure your microphone is set as the default recording device
  • Test microphone with other applications

Recognition Issues

  • Speak clearly and at a moderate pace
  • Reduce background noise
  • Adjust the timeout and phrase_time_limit values in main.py

No Audio Output

  • Check speaker/headphone connections
  • Verify system volume settings
  • Test pyttsx3 separately: python -c "import pyttsx3; engine = pyttsx3.init(); engine.say('test'); engine.runAndWait()"

Requirements.txt

Create a requirements.txt file with:

SpeechRecognition==3.10.0
pyttsx3==2.90
PyAudio==0.2.13
requests==2.31.0

Future Enhancements

  • Integration with OpenAI API for conversational AI
  • Weather information lookup
  • Calendar and reminder features
  • Email sending capability
  • System control (volume, brightness, etc.)
  • Multi-language support

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspired by JARVIS from Iron Man
  • Built with Python's speech recognition and text-to-speech libraries
  • Thanks to the open-source community

Contact

Your Name - ARYAN GUPTA

⭐ If you found this project helpful, please give it a star!

About

This is a JARVIS project that i tried to make after completing my python course.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages