A simple Python-based desktop assistant that can perform basic tasks like searching on Google, opening applications, telling the time, and more WITHOUT the use of Machine Learning (ML) or Artificial Intelligence (AI).
pyttsx3
library for text-to-speech conversion and the speech_recognition
library for speech recognition.To get started with the project, follow the instructions below.
Download and extract the zip file or clone the repository using the following command.
git clone https://github.com/vihar-s1/Desktop-Assistant
In the project root directory run setupProject.sh
script to create a virtual environment, and setup the project.
bash setupProject.sh
Once setup is complete, simply run the assistant.py
file to start using the Assistant.
python3 assistant.py
If you encounter the following error on macOS:
File ".../.venv/lib/python3.12/site-packages/pyttsx3/drivers/nsss.py", line 27, in NSSpeechDriver
@objc.python_method
^^^^
NameError: name 'objc' is not defined. Did you mean: 'object'?
Then open the nsss.py
library file and import objc
at the top of the file.
import objc
You may need to install PyObjC
using the following command:
pip3 install pyobjc
If you encounter the following error:
File "/Users/viharshah/Desktop/IdeaProjects/Desktop-Assistant/.venv/lib/python3.12/site-packages/pyttsx3/drivers/nsss.py", line 30, in initWithProxy
self = super(NSSpeechDriver, self).init()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'super' object has no attribute 'init'
sys:1: UninitializedDeallocWarning: leaking an uninitialized object of type NSSpeechDriver
Then replace the super(NSSpeechDriver, self).init()
line with the following:
objc.super(NSSpeechDriver, self).init()
NOTE: The templates are predefined and integrated in the repository so you can go to the Issues Tab and start writing your bug report, or feature request without any problem.
To discuss the project in depth with the contributors of the project about new features, bug requests, or just suggestions, go to the Discussion Page of the repository.