Voice Assistant Project Report
Voice Assistant Project Report
Voice Assistant Project Report
PROJECT REPORT ON
VOICE ASSISTANT
This is to certify that the project entitled VOICE ASSISTANT is Undertaken
at the Lovely professional university by GONE SAI PREETHAM and PRANAV KUMAR in
partial fulfilment of B.Tech. CSE degree (Semester III) Examination had not been submitted
for any other examination and does not form part of any other course undergone by the
candidate. It is further certified that he has completed all required phases of project.
SUBMITTED BY:
Student 2
NAME: PRANAV KUMAR
REGISTRATION NUMBER: 12016927
ROLL NUMBER: RK20SVB55
SUBMITTED TO:
Prof. Dr Siddhartha Singh Chouhan sir
1|Page
Acknowledgement
2|Page
VOICE ASSISTANT
INTRODUCTION
and the analysts are already predicting that 50% of searches will be via voice by 2020.Virtual
3|Page
assistants are turning out to be smarter than ever. Allow your intelligent assistant to make
email work for you. Detect intent, pick out important information, automate processes, and
deliver personalized responses.
This project was started on the premise that there is sufficient amount of openly
available data and information on the web that can be utilized to build a virtual assistant
that has access to making intelligent decisions for routine user activities.
BACKGROUND
There already exist a number of desktop virtual assistants. A few examples
of Current virtual assistants available in market are discussed in this section along with the
tasks they can provide and their drawbacks.
Supported Tasks:
*Call someone from my contacts list
*Launch an application on my iPhone
* Send a text message to someone
4|Page
*Set up a meeting on my calendar for 9am tomorrow
*Set an alarm for 5am tomorrow morning
*Play a specific song in my iTunes library
*Enter a new note
Drawback:
SIRI does not maintain a knowledge database of its own and its understanding
comes from the information captured in domain models and data models.
ReQall
ReQall is personal assistant software that runs on smartphones running
Apple iOS or Google Android operating system. It helps user to recall notes as well as tasks
within a location and time context. It records user inputs and converts them into
commands, and monitors current stack of user tasks to proactively suggest actions while
considering any changes in the environment. It also presents information based on the
context of the user, as well as filter information to the user based on its learned
understanding of the priority of that information.
Supported Tasks
*Reminders
*Email
*Calendar, Google Calendar
*Outlook
*Evernote
*Facebook, LinkedIn
*News Feeds
5|Page
Drawback
Will take some time to put all of the to-do items in – you could spend more
time putting the entries in than actually doing the revision.
OBJECTIVES
6|Page
PURPOSE, SCOPE AND APPILCABILITY
Purpose:
Purpose of virtual assistant is to being capable of voice interaction,
music playback, making to-do lists, setting alarms, streaming podcasts, playing audiobooks,
and providing weather, traffic, sports, and other real-time information, such as news. Virtual
assistant sense able users to speak natural language voice commands in order to operate
the device and its apps. There is an increased overall awareness and a higher level of
comfort demonstrated specifically by millennial consumers. In this ever-evolving digital
world where speed, efficiency, and convenience are constantly being optimized, it’s clear
that we are moving towards less screen interaction.
Scope:
7|Page
Applicability:
SURVEY OF TECHNOLOGY
Python:
Python is an OOPs (Object Oriented Programming) based, high level,
interpreted programming language. It is a robust, highly useful language focused on rapid
application development (RAD). Python helps in easy writing and execution of codes. Python
can implement the same logic with as much as 1/5code as compared to other OOPs
languages.
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
allowed it to enter into some of the most popular and complex processes like Artificial
Intelligence (AI), Machine Learning (ML), natural language processing, data science etc.
8|Page
Python has a lot of libraries for every need of this project. For this project we used libraries
used are speech recognition to recognize voice, Pyttsx for text to speech.
Python is reasonably efficient. Efficiency is usually not a problem for
small examples. If your Python code is not efficient enough, a general procedure to improve
it is to find out what is taking most the time, and implement just that part more efficiently in
some lower-level language. 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.
Pyttsx:
Pyttsx stands for Python Text to Speech. It is a cross-platform Python
wrapper for text-to-speech synthesis. It is a Python package supporting common text-to-
speech engines on MacOS X, Windows, and Linux. It works for both Python2.x and 3.x
versions. Its main advantages that it works offline.
Speech Recognition:
This is a library for performing speech recognition, with support for
several engines and APIs, online and offline It supports APIs like Google Cloud Speech API,
IBM Speech to Text, Microsoft Bing Voice Recognition etc.
9|Page
REQUIREMENT AND ANALYSIS
Problem definition:
combinations of airports to reach the destination. There is need of a system that can
manage tasks effortlessly. we already have multiple virtual assistants. But we hardly use it.
There are number of people who have issues in voice recognition. These systems can
understand English phrases but they fail to recognize in our accent.
Our way of pronunciation is way distinct from theirs also
they are easy to use on mobile devices than desktop systems. There is need of a virtual
assistant that can understand English in Indian accent and work on desktop system. when a
virtual assistant is not able to answer questions accurately, it’s because it lacks the proper
context or doesn’t understand the intent of the question. Its ability to answer questions
relevantly only happens with rigorous optimization, involving both humans and machine
learning. Continuously ensuring solid quality control strategies will also help manage the risk
of the virtual assistant learning undesired bad behaviours. They require large amount of
10 | P a g e
information to be fed in order for it to work efficiently. virtual assistant should be able to
model complex task dependencies and use these models to recommend optimized plans for
the user. It needs to be tested for finding optimum paths when a task has multiple sub-tasks
and each sub-task can have its own sub-tasks. In Such a case there can be multiple solutions
to paths, and the it should be able to consider user preferences, other active tasks, priorities
in order to recommend a particular plan.
Virtual assistants must provide a wide variety of services.
These include:
*Providing information such as weather, facts from e.g., Wikipedia etc.
*Set an alarm or make to-do lists and shopping lists.
*Remind you of birthdays and meetings.
*Play music from streaming services such as Saavn and Gaana.
*Play videos, TV shows or movies on televisions, streaming from e.g., Netflix or Hotstar.
*Book tickets for shows, travel and movies.
Feasibility Study
Feasibility study can help you determine whether or not you should proceed with
your project. It is essential to evaluate cost and benefit. It is essential to evaluate cost and
benefit of the proposed system. Five types of feasibility study are taken into
consideration.
Technical feasibility:
It includes finding out technologies for the project, both hardware and
software. For virtual assistant, user must have microphone to convey their message and a
11 | P a g e
speaker to listen when system speaks. These are very cheap now adays and everyone
generally, possess them. Besides, system needs internet connection. While using it, make
Sure, you have a steady internet connection. It is also not an issue in this era were almost
every home or office has Wi-Fi.
Operational feasibility:
It is the ease and simplicity of operation of proposed
system. System does not require any special skill set for users to operate it. In fact, it is
designed to be used by almost everyone. Kids who still don’t know to write can readout
problems for system and get answers.
Economic feasibility:
Here, we find the total cost and benefit of the Proposed system over current
system. For this project, the main cost is documentation cost. User also would have to pay
for microphone and speakers. Again, they are cheap and available. As far as maintenance is
concerned, it won’t cost too much.
Organizational feasibility:
This shows the management and organizational structure of the project.
This project is not built by a team. The management tasks are all to be carried out by a
single person. That won’t create any management issues and will increase the feasibility of
the project.
Cultural feasibility:
It deals with compatibility of the project with cultural environment.
Virtual assistant is built in accordance with the general culture. This project is technically
12 | P a g e
feasible with no external hardware requirements. also, it is simple in operation and does not
cost training or repairs. Overall feasibility study of the project reveals that the goals of the
proposed system is achievable. Decision is taken to proceed with the project.
Hardware:
*Pentium-pro processor or later.
*RAM 512MB or more.
Software:
*Windows 7(32-bit) or above.
*Python 3.9 or later
*Chrome Driver
13 | P a g e
CODE THAT EXECUTED
from neuralintents
import GenericAssistant
import speech_recognition
import pyttsx3 as tts
import sys
recognizer = speech_recognition.Recognizer()
speaker=tts.init()
speaker.setProperty('rate', 150)
todo_list=['Go Shopping', 'Clean Room', 'Record Video']
def create_note():
global recognizer
speaker.say("HAI PREETHAM HOW MAY I HELP YOU")
speaker.runAndWait()
done = False
while not done:
try:
with speech_recognition.Microphone() as mic:
recognizer.adjust_for_ambient_noise(mic,duration=0.2)
audio=recognizer.listen(mic)
note=recognizer.recognize_google(audio)
note=note.lower()
speaker.say("Choose a filename:")
speaker.runAndWait()
14 | P a g e
recognizer.adjust_for_ambient_noise(mic,duration=0.2)
audio=recognizer.listen(mic)
filename=recognizer.recognize_google(audio)
filename=filename.lower()
with open(filename,'w') as f:
f.write(note)
done=True
speaker.say(f"I successfully created the note {filename}")
speaker.runAndWait()
except speech_recognition.UnknownValueError:
recognizer=speech_recognition.Recognizer()
speaker.say("I did not understand you please try again")
speaker.runAndWait()
def add_tode():
global recognizer
speaker.say("What tode you want to add?")
speaker.runAndWait()
done = False
while not done:
try:
with speech_recognition.Microphone()as mic:
recognizer.adjust_for_ambient_noise(mic,duration=0.2)
audio=recognizer.listen(mic)
item=recognizer.recognize_google(audio)
item=item.lowe
15 | P a g e
todo_list.append(item)
done=True
speaker.say(f"I added {item} to the to do list!")
speaker.runAndWait()
except speech_recognition.UnknownValueError:
recognizer=speech_recognition.Recognizer()
speaker.say("I did not understand.please try again!")
speaker.runAndWait()
def show_todos():
speaker.say("The items on your to do list are the following")
for item in todo_list:
speaker.say(item)
speaker.runAndWait()
def hello():
speaker.say("Hello, What can i do for you?")
speaker.runAndWait()
def quit():
speaker.say("Bye")
speaker.runAndWait()
sys.exit(0)
mappings = {
"greeting": 'hello',
"create_note": create_note(),
"add_todo": 'add_todo',
"show_todos": show_todos,
16 | P a g e
"exit": quit
}
assistant = GenericAssistant('Sample intents.json',intent_methods=mappings)
assistant.train_model()
while True:
try:
with speech_recognition.Microphone()as mic:
recognizer.adjust_for_ambient_noise(mic,duration=0.2)
audio=recognizer.listen(mic)
message=recognizer.recognize_google(audio)
message=message.lower()
assistant.request(message)
except speech_recognition.UnknownValueError:
recognizer=speech_recognition.Recognizer()
17 | P a g e
18 | P a g e
REFERENCE AND BIBLIOGRAPHY
Websites referred:
www.stackoverflow.com
www.pythonprogramming.net
www.codecademy.com
www.tutorialspoint.com
www.google.co.in
Books referred
CS Dojo
eureka!
THANK YOU
19 | P a g e
20 | P a g e