A Python-based voice assistant inspired by Iron Man's JARVIS that can perform various automation tasks through voice commands.
- Voice Recognition: Listens to voice commands in English
- Text-to-Speech: Responds with computer-generated voice
- WhatsApp Automation: Send messages via voice commands
- Google Search: Search and get Wikipedia summaries
- YouTube Integration: Search and play videos on YouTube
- How-to Queries: Get step-by-step instructions using WikiHow
Before running this program, make sure you have Python installed on your system and the following packages:
pip install pyttsx3
pip install speechrecognition
pip install pywhatkit
pip install pywikihow
pip install wikipedia
pip install pyaudio
- Clone this repository:
git clone https://github.com/Talha-Aslam/Jarvis_Program.git
cd Jarvis_Program
- Install required dependencies:
pip install -r requirements.txt
- Run the main program:
python main.py
Once the program is running, you can use the following voice commands:
- Say: "send message" or "whatsapp message"
- Follow the prompts to provide phone number and message
- Say: "search on google [your query]"
- For how-to queries: "how to [your question]"
- Search: "search on youtube [your query]"
- Play video: "play video [video name]"
Jarvis_Program/
├── main.py # Main program with voice recognition and task execution
├── Automation.py # WhatsApp automation functionality
├── Feautures.py # Google search and YouTube features
└── README.md # This file
- Uses Google's speech recognition API
- Converts speech to text with English (India) language model
- Processes commands with 2-second pause threshold
- Uses pyttsx3 with SAPI5 voice driver
- Customizable voice selection and speech rate
- Currently set to voice index 5 at 130 WPM
-
main.py:
- Initializes voice engine
- Handles voice recognition
- Processes and routes commands
-
Automation.py:
- WhatsApp web automation using pywhatkit
- Sends instant messages to specified numbers
-
Feautures.py:
- Google search with Wikipedia integration
- YouTube search and video playback
- WikiHow integration for instructional content
Command | Function |
---|---|
"message" / "whatsapp message" | Send WhatsApp message |
"search on google [query]" | Search Google and get summary |
"how to [question]" | Get step-by-step instructions |
"search on youtube [query]" | Search YouTube |
"play video [name]" | Play specific YouTube video |
You can modify voice settings in main.py
:
- Change voice: Modify
voices[5].id
to different index - Adjust speed: Change
rate
value (default: 130)
- Ensure WhatsApp Web is accessible
- First-time users may need to scan QR code
- Microphone not working: Check system permissions
- Voice not recognized: Ensure clear pronunciation and minimal background noise
- WhatsApp not sending: Verify internet connection and WhatsApp Web access
- Import errors: Ensure all required packages are installed
If you encounter issues with pyaudio:
# On Windows
pip install pipwin
pipwin install pyaudio
# On Linux
sudo apt-get install portaudio19-dev python3-pyaudio
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is open source and available under the MIT License.
- Add more voice commands
- Implement weather updates
- Add calendar integration
- Support for multiple languages
- GUI interface
- Smart home device control
Talha Aslam
- GitHub: @Talha-Aslam
Note: This is an educational project. Ensure you have proper permissions before automating messaging services.