Minor Project Report
Minor Project Report
IES UNIVERSITY,
BHOPAL
PROJECT REPORT
SEMESTER : 6th
COURSE : B-TECH (CSE- AIML)
Submitted To:
1
Project Report
Contents
PURPOSE....................................................................................................... 3
INTRODUCTION............................................................................................. 4
LIBRARIES.................................................................................................... 10
COMPLETE CODE..........................................................................................11
CONCLUSION............................................................................................... 15
REFERENCES.................................................................................................16
2
Project Report
PURPOSE:
This Software aims at developing a personal assistant for windows-
based systems. The main purpose of the software is to perform the tasks
command. ZIRA draws its inspiration from Virtual assistants like Cortana
for Windows and Siri for iOS. Users can interact with the assistant either
3
Project Report
INTRODUCTION:
hands and it is nothing less than having world at your finger tips. These
days we aren’t even using fingers. We just speak of the task and it is
done. There exist systems where we can say Text Dad, “I’ll be late today.”
And the text is sent. That is the task of a Virtual Assistant. It also supports
operations.
Virtual Assistants are software programs that help you ease your day to
shopping lists etc. They can take commands via text (online chat bots) or
project the wake word is JIA. We have so many virtual assistants, such
as Apple’s Siri, Amazon’s Alexa and Microsoft’s Cortana. For this project,
4
Project Report
conducted via mobile devices have only just overtaken those carried out
using a computer and the analysts are already predicting that 50% of
searches will be via voice by 2020. Virtual assistants are turning out
work for you. Detect intent, pick out important information, automate
webbrowser.
voicecommand.
5
Project Report
call-button operated service where a voice asks the user “What can I do
Currently, the project aims to provide the Windows Users with a Virtual
Assistant that would not only aid in their daily routine tasks like
searching the web, playing music and many others but also help in
6
Project Report
Python:
writing and execution of codes. Python can implement the same logic
Python provides a huge list of benefits to all. The usage of Python is such
that it cannot be limited to only one activity. Its growing popularity has
language processing, data science etc. Python has a lot of libraries for
every need of this project. For ZIRA, libraries used are speechrecognition
automation etc.
procedure to improve it is to find out what is taking most the time, and
7
Project Report
language.
8
Project Report
This will result in much less programming and more efficient code
(because you will have more time to optimize) than writing everything
in a low-level language.
9
Project Report
burden on the machine running it. This system is being build keeping in
assistant.
Hardware:
Software:
• Chrome Driver
10
Project Report
LIBRARIES:
pip install pyttsx3
pip install
Wikipedia
Pyttsx3:
works for both Python2.x and 3.x versions. Its main advantage is that it
works offline.
Sapi5:
VoiceID:
voice[1].id = Female
voice
11
Project Report
COMPLETE CODE:
import pyttsx3
import speech_recognition as sr
import datetime
import wikipedia
import
webbrowser
import os
engine = pyttsx3.init('sapi5')
voices =
engine.getProperty('voices') #
print(voices[1].id)
engine.setProperty('voice', voices[1].id)
def speak(audio):
"""
This method will allow Zira to speak, It take our voice as an argument
"""
engine.say(audio)
engine.runAndWait()
def greetUser():
"""
"""
hour = int(datetime.datetime.now().hour)
12
Project Report
speak("Good Morning!")
13
Project Report
speak("Good Afternoon!")
else:
speak("Good Evening!")
speak("My name is Zira, I am your voice assistant. Please tell me how may
I help you?")
def takeCommand():
"""
It takes microphone input from the user and returns string output, return
"""
r = sr.Recognizer()
with sr.Microphone() as
help?") r.pause_threshold
= 1 audio =
r.listen(source)
try:
print("Recognizing...")
except Exception as e:
14
Project Report
return query
greetUser()
while True:
# if 1:
query = takeCommand().lower()
if 'wikipedia' in query:
speak('Searching in Wikipedia...')
speak("According to Wikipedia")
print(results)
speak(results)
webbrowser.open("youtube.com")
webbrowser.open("google.com")
webbrowser.open("bahria.edu.pk")
15
Project Report
webbrowser.open("stackoverflow.com")
music_dir = 'F:\\MP3'
songs = os.listdir(music_dir)
print(songs)
os.startfile(os.path.join(music_dir, songs[0]))
strTime = datetime.datetime.now().strftime("%H:%M:%S")
"
os.startfile(codePath)
os.startfile(codePath)
exit()
16
Project Report
CONCLUSION:
One of the main advantages of voice searches is their rapidity. In fact,
around 150 during the same period of time. In this respect, the ability of
a single line command. It eases most of the tasks of the user like
searching the web, playing music, opening chrome and time related
administration.
The entire code along with some additional files for this voice assistant
17
Project Report
REFERENCES:
Websites referred
www.stackoverflow.com
www.pythonprogramming.net
www.codecademy.com
www.tutorialspoint.com
Books referred
Documents referred
Databases
- Purushotham Botla
of Computational Agents
18