DT - Final
DT - Final
Group Number: 6
1. Project Title
Voice Assistant
Our project is based on virtual assistants which work on computers and
laptops.
2. Problem statement
Artificial Intelligence personal assistants have become plentiful over the last few years.
Applications such as Siri, Bixby, Ok Google, and Cortana make mobile device
users’ daily routines that much easier. You may be asking yourself how these
function. Well, the assistants receive external data (such as movement, voice,
light, GPS readings, visually defined markers, etc.) via the hardware’s sensors for
further processing - and take it from there to function accordingly. Not too long
ago, building an AI assistant was a small component of developers’ capacities;
however, nowadays, it is quite a realistic objective even for novice programmers.
3. Key Features/Benefits
1. Easy to use
2. Give Smart and perfect look to pc
3. IT works as an assistant for your pc which can run on your voice.
University Institute of Engineering
Department of Computer Science & Engineering
4. Software/Module used
1.PYTTSX3
2. SPEECH RECOGNITION
3. PYAUDIO
4. WEB BROWSER
5. Pycharm
4. Codes
import webbrowser
import speech_recognition as sr
import pyttsx3
import dateTime
import Wikipedia
import pyjokes
listener = sr.Recognizer()
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)
string = "lowercase"
print(string.lower())
def speak(text):
engine.say(text)
engine.runAndWait()
University Institute of Engineering
Department of Computer Science & Engineering
def take_command():
with sr.Microphone() as source:
print('listening...')
text = listener.listen(source)
try:
print('Searching...')
command = listener.recognize_google(text, language='en-in')
print(f"User said: {text}\n")
except:
return "None"
return command
def run_devil():
command = take_command()
print(command)
if 'hello' in command:
speak('hey bro,how are you)
elif 'time' in command:
time = datetime.datetime.now().strftime('%I:%M %p')
speak('Now time is' + time)
elif 'wikipedia' in command:
command = command.replace("wikipedia","")
found = wikipedia.summary(command)
speak('according to wikipedia')
print(found)
elif 'tell me joke' in command:
speak(pyjokes.get_joke())
elif 'devil i am getting bored' in command:
speak("i have one solution do you want to play some music")
webbrowser.open("https://www.netflix.com/browse")
elif 'who are you in command:
speak(('I am project, And my creator is Group 6'))
while True:
run_devil()
5. References
Online Websites
An online website like Github and StackOverflow helps in solving
errors in code and provides the best references for us.
Python Books
Books are a major component in any project, so for this project, we
have taken references from these major books
Learning python – 5th edition[Mark lutz]
Learning with Python: How to Think Like a
Computer Scientist [Allen Downey]