Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 39

Jarvis: Voice Assistant

A Major Project Report Submitted to

Mandsaur University, Mandsaur


Towards Partial Fulfillment for the Award of

Masters of Computer Application

Submitted By
Ashwin Marchya
22CSA5MCA1007

Department of Computer Science & Application


Mandsaur University, Mandsaur
2023-24
Jarvis: Voice Assistant
A Major Project Report Submitted to

Mandsaur University, Mandsaur


Towards Partial Fulfillment for the Award of

Masters of Computer Application

Submitted To Submitted By
Dr. Nilesh Jain Ashwin Marchya
Associate Professor 22CSA5MCA1007

Department of Computer Application


Mandsaur University, Mandsaur
2023-24
TABLE OF CONTENTS Page No
Certificate i
Dissertation Approval Sheet ii
Company Certificate iii
Declaration iv
Acknowledgement v
Abstract vi

CHAPTER 1: INTRODUCTION 01 - 03
1.1 Aim of Project
1.2 Proposed System
1.3 Scope

CHAPTER 2: REQUIRMENT SPECIFICATION 04


2.1 Requirement Alalysis
2.2 Software Specification
2.3 Hardware Specification

CHAPTER 3: FEASIBILITY ANALYSIS 05


3.1 Technical Feasibility
3.2 Economical Feasibility

CHAPTER 4: TECHNOLOGY USED 06


4.1 Selection Of Platform

CHAPTER 5: PLANNING AND DESIGNING 07


5.1 Data Flow Diagram
5.2 Use Case Diagram

CHAPTER 6: IMPLEMENTATION 08 - 19
6.1 Real Life Application
6.2 Implementation

CHAPTER 7: TESTING 20-25


7.1 Functionality
7.2 Usability

CHAPTER 8: LIMITATION OF PROJECT 26

CHAPTER 9: FUTUTRE SCOPE 27

CHAPTER 10: CONCLUSION 28

CHAPTER 11: BIBLIOGRAPHY/REFERENCES 29


Department of Computer Science &Application
Mandsaur University, Mandsaur

CERTIFICATE

The Project Report entitled “Jarvis : Voice Assistant ” being submitted by Ashwin
Marchya (Enrollment No.: 22CSA5MCA1007)has been examined by us and is
hereby approved for the award of degree Master of Computer Application for
which it has been submitted. It is understood that by this approval the undersigned do
not necessarily endorse or approve any statement made, opinion expressed or
conclusion drawn therein, but approve the dissertation only for the purpose for which
it has been submitted.

Internal Examiner External Examiner


Date: Date:

i
Department of Computer Science &Application
Mandsaur University, Mandsaur

PROJECT REPORT APPROVAL SHEET

The project report work entitled “Jarvis: Voice Assistant” submitted by Ashwin
Marchya (Enrollment No. 22CSA5MCA1007) is approved as partial fulfillment for
the award of the Master of Computer Application degree by Mandsaur University,
Mandsaur (M.P).

Approved by

Prof. Dr. Nilesh Jain


(HOD CA)

ii
COMPANY CERTIFICATE

spiritvisionconnect@gmail.com

431-B,BhopalpuraMainRoad
Bhopalpura,Udaipur

Date - 30April, 2024

To Whom It May
Concern
Its is hereby certified that Mr. Ashwin Marchya worked on
Jarvis: Voice Assistant in our company from
01/02/2024to 30/04/2024 .

During his tenure, we found him sincere, hard working

and efficient. We wish all success in his future

endeavors.

Manan Trivedi
Director
iii

Department of Computer Science &Application


Mandsaur University, Mandsaur

DECLARATIONS

I hereby declare that the work, which is being presented in the project report, entitled
“Jarvis: Voice Assistant” partial fulfillment of the requirements for the award of
degree of Master of Computer Application submitted in the Department of
Computer Application(Mandsaur University, Mandsaur) is an authentic record
of my own work carried under the guidance of Prof. Dr. Nilesh Jain. I have not
submitted the matter embodied in this report for award of any other degree.

Ashwin Marchya
22CSA5MCA1007
iv

ACKNOWLEDGEMENT

I take the opportunity to express my cordial gratitude to Dr. Nilesh Jain, HOD Department of
Computer Science & Application, Mandsaur University, Mandsaur (M.P.) for the valuable
guidance and inspiration throughout the dissertation work. I feel thankful for his innovative ideas,
which led to successful completion of this work.

I give special thanks to Prof. Dr. B. K. Sharma, Prof., Department of Computer Science &
Application, Mandsaur University, Mandsaur (M.P.) to always being willing to help find solutions
to any problems I had with my work.

I would also like to thanks “Dr. Nilesh Jain” Associate Professor, Department of Computer
Science & Application, Mandsaur University, Mandsaur (M.P.) for providing additional guidance
and insight into my research work.

I express my gratitude and thanks to all the staff members of Computer Science & Engineering
department for their sincere cooperation in furnishing relevant information to complete this
dissertation well in time successfully.

Lastly but not least I must express my cordial thank to my parent, family members and friends who
gave me the moral support without which it was impossible to complete my project work. With this
note I thank everyone for the support.

Ashwin Marchya
v

ABSTRACT
As we know Python is an emerging language so it becomes easy to write a script for Voice
Assistant in Python. The instructions for the assistant can be handled as per the requirement
of user. Speech recognition is the process of converting speech into text. This is commonly
used in voice assistants like Alexa, Siri, etc. In Python there is an API called
SpeechRecognition which allows us to convert speech into text. It was an interesting task
to make my own assistant. It became easier to send emails without typing any word,
Searching on Google without opening the browser, and performing many other daily tasks
like playing music, opening your favorite IDE with the help of a single voice command. In
the current scenario, advancement in technologies are such that they can perform any task
with same effectiveness or can say more effectively than us. By making this project, I
realized that the concept of AI in every field is decreasing human effort and saving time.

Functionalities of this project include:

1.Itcan send emails.


2.Itcan search wikipedia.
3.Itcan open WhatsApp, facebook, instagram, google, ETC.
4.Itcan open command prompt.
5.Itcan play music.
6.Itcan do Wikipedia searches for you.
7.Itcan search anything Example:- what is python, how to create tkinter ETC.
8.Itcan give weather forecast.
9.Itcan give desktop reminders of your choice.
10. Itcan have some basic conversation.

Now the basic question arises in mind that how it is an AI? The virtual assistant that I have
created is like if it is not an A.I, but it is the output of a bundle of the statement. But
fundamentally, the mail purpose of A.I machines is that it can perform human tasks with the
same efficiency or even more efficiently than humans. It is a fact that my virtual assistant is
not a very good example of A.I., but it is an A.I.
vi
CHAPTER 1: INTRODUCTION

1. INTRODUCTION
Artificial Intelligence when used with machines, it shows us the capability of
thinking like humans. In this, a computer system is designed in such a way that typically
requires interaction from human. As we know Python is an emerging language so it
becomes easy to write a script for Voice Assistant in Python. The instructions for the
assistant can be handled as per the requirement of user. Speech recognition is the Alexa,
Siri, etc. In Python there is an API called Speech Recognition which allows us to
convert speech into text. It was an interesting task to make my own assistant. It became
easier to send emails without typing any word, Searching on Google without opening
the browser, and performing many other daily tasks like playing music, opening your
favorite IDE with the help of a single voice command. In the current scenario,
advancement in technologies are such that they can perform any task with same
effectiveness or can say more effectively than us. By making this project, I realized that
the concept of AI in every field is decreasing human effort and saving time.

As the voice assistant is using Artificial Intelligence hence the result that it is
providing are highly accurate and efficient. The assistant can help to reduce human
effort and consumes time while performing any task, they removed the concept of
typing completely and behave as another individual to whom we are talking and asking
to perform task. The assistant is no less than a human assistant but we can say that this
is more effective and efficient to perform any task. The libraries and packages used to
make this assistant focuses on the time complexities and reduces time.

The functionalities include , It can send emails, It can read PDF, It can send text
on WhatsApp, It can open command prompt, your favorite IDE, notepad etc., It can play
music, It can do Wikipedia searches for you, It can open websites like Google,
YouTube, etc., in a web browser, It can give weather forecast, It can give desktop
reminders of your choice. It can have some basic conversation.

Tools and technologies used are PyCharm IDE for making this project, and I
created all py files in PyCharm. Along with this I used following modules and libraries
in my project. pyttsx3, SpeechRecognition, Datetime, Wikipedia, Smtplib, pywhatkit,
pyjokes, pyPDF2, pyautogui, pyQt etc. I have created a live GUI for interacting with the
JARVIS as it gives a design and interesting look while having the conversation.

1
1.1 Aim of Project

The main aim of are project is to implementation of Voice Bassed system, to


easily save time. And make easy all things. It is mainly use for work over voice.

1.2 PROPOSED SYSTEM


It was an interesting task to make my own assistant. It became easier to send
emails without typing any word, Searching on Google without opening the browser,
and performing many other daily tasks like playing music, opening your favorite IDE
with the help of a single voice command. Jarvis is different from other traditional voice
assistants in terms that it is specific to desktop and user does not need to make account
to use this, it does not require any internet connection while getting the instructions to
perform any specific task.

The IDE used in this project is PyCharm. All the python files were created in
PyCharm and all the necessary packages were easily installable in this IDE. For this
project following modules and libraries were used i.e. pyttsx3, SpeechRecognition,
Datetime, Wikipedia, Smtplib, pywhatkit, pyjokes, pyPDF2, pyautogui, pyQt etc. I
have created a live GUI for interacting with the JARVIS as it gives a design and
interesting look while having the conversation.

With the advancement JARVIS can perform any task with same effectiveness or
can say more effectively than us. By making this project, I realized that the concept of
AI in every field is decreasing human effort and saving time. Functionalities of this
project include, It can send emails, It can read PDF, It can send text on WhatsApp, It
can open command prompt, your favorite IDE, notepad etc., It can play music, It can
do Wikipedia searches for you, It can open websites like Google, YouTube, etc., in a
web browser, It can give weather forecast, It can give desktop reminders of your
choice. It can have some basic conversation.

2
1.3Scope

Voice assistants will continue to offer more individualized experiences as they get better
at differentiating between voices. However, it’s not just developers that need to address
the complexity of developing for voice as brands also need to understand the capabilities
of each device and integration and if it makes sense for their specific brand. They will also
need to focus on maintaining a user experience that is consistent within the coming years
as complexity becomes more of a concern. This is because the visual interface with voice
assistants is missing. Users simply cannot see or touch a voice interface.

3
CHAPTER 2: REQUIREMENT SPECIFICATION

2.1 Requirement Analysis


Personal assistant software is required to act as an interface into the digital world by
understanding user requests or commands and then translating into actions or
recommendations based on agent’s understanding of the world.

2.2 Software Specification


• Windows 7(32-bit) or above.
• Python 2.7 or later

2.3 Hardware Specification


• Pentium-pro processor or later.
• RAM 512MB or more.

4
CHAPTER 3: FEASIBILITY ANALYSIS

3.1 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 speaker to listen when
system speaks. These are very cheap now a days and everyone generally possess them.

3.2Economical 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.

5
CHAPTER 4: TECHNOLOGY USED
The IDE used in this project is PyCharm. All the python files were created in PyCharm and
all the necessary packages were easily installable in this IDE. For this project following modules
and libraries were used i.e. pyttsx3, SpeechRecognition, Datetime, Wikipedia, Smtplib, pywhatkit,
pyjokes, pyPDF2, pyautogui, pyQt etc. I have created a live GUI for interacting with the JARVIS
as it gives a design and interesting look while having the conversation.

4.1. Selection of Platform


Pycharm is an IDE i.e. Integrated Development Environment which has many features like it
supports scientific tools(like matplotlib, numpy, scipy etc) web frameworks (example
Django,web2py and Flask) refactoring in Python, integrated python debugger, code completion,
code and project navigation etc. It also provides Data Science when used with Anaconda.

Figure 4.1 PyCharm IDE

6
CHAPTER 5: PLANNING AND DESIGNING

2.1. DATA FLOW


The data flow for JARVIS is as follow:

• Live GUI for interaction will appear on screen.


Start

• It will take input through voice commands related to the task which
is required to be done.
Input

• It will perform the required task for the user like opening
notepad, searching on browser, sending mails, playing songs
etc.
Perfor
m
• It keeps on asking for the command from user until the user say
"Quit". Once the user say "Quit", it exits.

Exit
Data flow for JARVIS

The system is designed using the concept of Artificial Intelligence and with
the help of necessary packages of Python. Python provides many libraries
and packages to perform the tasks, for example pyPDF2 can be used to
read PDF. The details of these packages are mentioned in Chapter 3 of this
report.

The data in this project is nothing but user input, whatever the user says,
the assistant performs the task accordingly. The user input is nothing
specific but the list of tasks which a user wants to get performed in human
language i.e. English

7
CHAPTER 6: IMPLEMENTATION

JARVIS, a desktop assistant is a voice assistant that can perform many daily tasks of
desktop like playing music, opening your favorite IDE with the help of a single voice command.
Jarvis is different from other traditional voice assistants in terms that it is specific to desktop and
user does not need to make account to use this, it does not require any internet connection while
getting the instructions to perform any specific task.

6.1. REAL LIFE APPLICATION

6.1.1. Saves time:JARVIS is a desktop voice assistant which works on the voice
command offered to it, it can do voice searching, voice-activated device control and can let us
complete a set of tasks.

6.1.2. Conversational interactionIt makes it easier to complete any task as it


automatically do it by using the essential module or libraries of Python, in a conversational
interaction way. Hence any user when instruct any task to it, they feel like giving task to a human
assistant because of the conversational interaction for giving input and getting the desired output in
the form of task done.

6.1.3. Reactive nature:The desktop assistant is reactive which means it know human
language very well and understand the context that is provided by the user and gives response in the
same way, i.e. human understandable language, English. So user finds its reaction in an informed
and smart way.

6.1.4. Multitasking:The main application of it can be its multitasking ability. It can ask
for continuous instruction one after other until the user “QUIT” it.

6.1.5. No Trigger phase:It asks for the instruction and listen the response that is given
by user without needing any trigger phase and then only executes the task.

6.2. IMPLEMENTATION
As the first step, install all the necessary packages and libraries. The command used to install
the libraries is “pip install” and then import it. The necessary packages included are as follows:

6.2.1. LIBRARIES AND PACKAGES

6.2.2.1. pyttsx3:It is a python library which converts text to speech.

6.2.2.2. SpeechRecognition: It is a python module which converts speech to


text.

8
6.2.2.3. pywhatkit: It is python library to send WhatsApp message at a particular time with
some additional features.

6.2.2.4. Datetime: This library provides us the actual date and time.

6.2.2.5. Wikipedia: It is a python module for searching anything on Wikipedia.

6.2.2.6. Smtplib: Simple mail transfer protocol that allows us to send mails and to route mails
between mail servers.

6.2.2.7. Pyjokes: It is a python libraries which contains lots of interesting jokes in it.

6.2.2.8. Webbrowser: It provides interface for displaying web-based documents to users.

6.2. 2.9. Pyautogui: It is a python librariy for graphical user interface.

6.2.2.10. os: It represents Operating System related functionality.

6.2.2.11. sys: It allows operating on the interpreter as it provides access to the variables and
functions that usually interact strongly with the interpreter.
6.2.12. tkinter: It is used to create GUI Interface to run Jarvis.

6.2.13 messagebox: It is used to get speak on text format into a messagebox.

Figure 6.1 Imported Modules

19
6.2.2. FUNCTIONS

6.2.2.1. takeCommand():The function is used to take the command as input through


microphone of user and returns the output as string.

6.2.2.2. wishMe():This function greets the user according to the time like Good
Morning, Good Afternoon and Good Evening.

6.2.2.3. taskExecution():This is the function which contains all the necessary task
execution definition like sendEmail(), pdf_reader(), news() and many conditions in if
condition like “open google”, “open notepad”, “search on Wikipedia” ,”play music” and
“open command prompt” etc.

6.2.2.4. sendEmail(): This is the mail function. It is used to send mail to


any person. In this function Iam used login and password for sending
mail.
6.2.2.5. jokes(): This function I used for jokes. In this function I used a
pyjoke library to get a joke from Jarvis.
6.2.2.6. date():This function are used to get a date from Jarvis. And used datetime
library for taking a current date from Jarvis.

10
6.2.2 Source Code and Commands
1.

2.

11
3.

4.

12
5.

6.

13
7.

8.

14
9.

10.

15
11.

12.

16
13.

14. This is user created package

17
15. Jarvis are in listening mode

18
6.2.3 Input/Output Screenshot

19
Chapter 7: Testing

The system testing is done on fully integrated system to check whether the requirements are
matching or not. The system testing for JARVIS desktop assistant focuses on the following four
parameters:

7.1. FUNCTIONALITY
In this we check the functionality of the system whether the system performs the task which it
was intended to do. To check the functionality each function was checked and run, if it is able to
execute the required task correctly then the system passes in that particular functionality test. For
example to check whether JARVIS can search on Google or not, as we can see in the figure 7.1,
user said “What is python”, then Jarvis Jarvis open Google and searched for the required input.

Figure 7.1 Input through voice commands

Figure 7.2 Output

20
check whether JARVIS can search on Google or not, as we can see in the figure 7.3, user said
“Mandsaur ”, then Jarvis said Wikipedia of mandsaur.

Figure 7.3 Output

check whether, as we can see in the figure 7.4, user said “jarvis tell me a joke ”, then Jarvis said a
joke.

Figure 7.4 Output

21
check whether, as we can see in the figure 7.5, user said “jarvis tell me a current date ”, then Jarvis
said a date.

Figure 7.5 Output

check whether, as we can see in the figure 7.6, user said “jarvis play (Song name) ”, then Jarvis
play a song on youtube.

Figure 7.6 Output

22
check whether, as we can see in the figure 7.7, user said “jarvis play music ”, then Jarvis play
music.

Figure 7.7 Output

check whether, as we can see in the figure 7.8, user said “jarvis set alarm on 4.45 am ”, then Jarvis
set alarm.

Figure 7.8 Output

23
check whether, as we can see in the figure 7.9, user said “Jarvis tell me on 21 june”, then Jarvis
check what I have on 21 june.

Figure 7.9 Output

check whether, as we can see in the figure 7.10, user said “Jarvis remember that tomorrow I go to
out of station”, then Jarvis remind.

Figure 7.10 Output

24
7.2. USABILITY
Usability of a system is checked by measuring the easiness of the software and how user friendly it
is for the user to use, how it responses to each query that is being asked by the user.

It makes it easier to complete any task as it automatically do it by using the essential module or
libraries of Python, in a conversational interaction way. Hence any user when instruct any task to it,
they feel like giving task to a human assistant because of the conversational interaction for giving
input and getting the desired output in the form of task done.

The desktop assistant is reactive which means it know human language very well and understand
the context that is provided by the user and gives response in the same way, i.e. human
understandable language, English. So user finds its reaction in an informed and smart way.

The main application of it can be its multitasking ability. It can ask for continuous instruction one
after other until the user “QUIT” it. It asks for the instruction and listen the response that is given
by user without needing any trigger phase and then only executes the task.

25
CHAPTER 8: LIMITATIONS OF PROJECT
While voice assistants have interesting and useful features, they also pose several unique problems.
One main issue with these voice-activated devices is security. Anyone with access to a voice-
activated device can ask it questions, gather information about the accounts and services associated
with the device. This poses a major security risk since the devices will read out calendar contents,
emails, and highly personal information.

Voice assistants are also vulnerable to several other attacks. Researchers have recently proven that
voice assistants will respond to inaudible commands delivered at ultrasonic frequencies. This
would allow an attacker to approach a victim, play the ultrasonic command, and the victim’s device
would respond.

Privacy is another big concern for voice assistant users. By their very nature, these devices must be
listening at all times to respond to users. Amazon, Apple, Google, and Microsoft insist that their
devices are not recording unless users speak the command to wake the assistant. Still, there has
been at least one case where a malfunctioning device was recording at all times and sending those
recordings back to Google’s servers. Even if the companies developing these voice assistants are
being careful and conscientious, there is a potential for data to be stolen, leaked, or used to
incriminate people.

26
CHAPTER 9: FUTURE SCOPE

Voice assistants will continue to offer more individualized experiences as they get
better at differentiating between voices. However, it’s not just developers that need to address
the complexity of developing for voice as brands also need to understand the capabilities of
each device and integration and if it makes sense for their specific brand. They will also need
to focus on maintaining a user experience that is consistent within the coming years as
complexity becomes more of a concern. This is because the visual interface with voice
assistants is missing. Users simply cannot see or touch a voice interface.

9.1. Make JARVIS to learn more on its own and develop a new skill in it.

9.2. JARVIS android app can also be developed.

9.3. Make more Jarvis voice terminals.

9.4. Voice commands can be encrypted to maintain security.

27
CHAPTER 10: CONCLUSION

Through this voice assistant, we have automated various services using a single
line command. It eases most of the tasks of the user like searching the web,
retrieving weather forecast details, vocabulary help and medical related queries.
We aim to make this project a complete server assistant and make it smart
enough to act as a replacement for a general server administration. The future
plans include integrating Jarvis with mobile using React Native to provide a
synchronised experience between the two connected devices. Further, in the
long run, Jarvis is planned to feature auto deployment supporting elastic
beanstalk, backup files, and all operations which a general Server Administrator
does. The functionality would be seamless enough to replace the Server
Administrator with Jarvis.

JARVIS is a very helpful voice assistant without any doubt as it saves time of the user
by conversational interactions, its effectiveness and efficiency. But while working on this
project, there were some limitations encountered and also realized some scope of
enhancement in the future which are mentioned below:

28
CHAPTER 11: BIBLIOGRAPHY/REFERENCES

YouTube Channels referred:

https://www.youtube.com/watch?
v=Lp9Ftuq2sVI&list=PLXYBuHnPImPu1KNqOo9nvy4a0W3bXG1Ke

Website referred:

www.w3schools.com/python

www.geeksforgeeks.org

29

You might also like