“David” is a lightweight voice-controlled assistant developed in Python, created during my first attempt to develop a voice-activated assistant.
It uses speech recognition and synthesis to interact with the user, respond to commands, search the web, play YouTube videos, tell jokes, and provide real-time information such as the current time or day.
Key Features:
Voice Recognition: Converts spoken input to text using Google’s speech recognition.
Text-to-Speech Output: Responds to the user using the
pyttsx3TTS engine.Web Actions:
Opens websites like YouTube and Google
Searches the internet using
pywhatkitPlays YouTube videos by voice
Date & Time Responses
Wikipedia Search: Fetches a short summary from Wikipedia
Tells Jokes: Uses
pyjokesfor random tech jokesVoice-triggered Exit (e.g. “goodbye”)
How to Use:
Run the script:
python voice-assistant.pySay commands like:
“open youtube”
“do a wikipedia search for Python”
“play No Me”
“what day is today”
“joke”
“goodbye”
Dependencies:
speech_recognitionpyttsx3pywhatkitpyjokeswikipediawebbrowser(builtin)datetime(builtin)
to install them all together:
pip install speechrecognition pyttsx3 pywhatkit pyjokes wikipedia
''' if you are using Anaconda'''
conda install speechrecognition pyttsx3 pywhatkit pyjokes wikipedia