A python based virtual assistant.
This project has a lot of dependencies:
- SpeechRecognition 3.8.1
pip install SpeechRecognition
- pyttsx3
pyttsx3==2.6
- webbrowser
comes pre-installed
- wikipedia
pip install wikipedia
- urllib
comes pre-installed
- lxml
pip install lxml
- nltk
pip install nltk
- googlesearch
pip install beautifulsoup4 && pip install google
- pygame
pip install pygame
- yr-python
pip install python-yr
- time
comes pre-installed
- math
comes pre-installed
- os
comes pre-installed
- PyAudio
pip install pyaudio
* - json
comes pre-installed
- request
pip install requests
- random
comes pre-installed
I have included a requirements.txt file to help speed up the process, but The pyaudio module might not install. (See below)
* PyAudio is very difficult to get on windows try the pip command and if that fails, go to stackoverflow and follow the instructions. That was what worked for me. If that doesn't work, and you've got Conda try to Conda install it.
The project has a few notes to consider.
- At the top of the code, there is a line that says
weather = Yr(location_name='South_Africa/KwaZulu-Natal/Durban/'
. Inbetween the single quotes you will have to put your location. You can find it by going onto yr, searching your location and taking the place from the URL after the /place and putting inbetween the single quotes. - There are a lot of lines that contain the following line of code:
speech = sr.Microphone(device_index=2)
. I had to make my microphone's device index 2 because that was the microphone I want to use. You might have to change this around to whatever input device suits your needs.
A custom license is used. This work is under Creative Commons Attribution-ShareAlike 4.0 International. If you want to use my work please give me attribution. A valid attribution URL is https://github.com/CaydendW/
I used some sound files for the on and off sounds. They are both listed under Atribution 3.0
- Title: Robot Blip
- Uploaded: 01.11.11
- License: Attribution 3.0
- Edits: Changed format from mp3 to ogg
- Recorded by Marianne Gagnon
- Title: Robot Blip 2
- Uploaded: 01.05.11
- License: Attribution 3.0
- Edits: Changed format from mp3 to ogg
- Recorded by Marianne Gagnon
I also used a joke API from fellow Github user: Sv443. I did not have to give attribution but the project is here: Joke API. Please go give him a star and add some jokes to the API here!