0% found this document useful (0 votes)
8 views

Group 1 Project report jarvis ai voice assistant

The document presents a mini project report on 'JARVIS: AI Voice Assistant' submitted by students at Alamuri Ratnamala Institute of Engineering and Technology for their Bachelor of Engineering degree. It outlines the project's objectives, background research, system design, and proposed functionalities of the voice assistant, which aims to enhance user interaction through voice commands. The report emphasizes the importance of voice recognition technology and its applicability in various devices and systems, while also addressing existing challenges and future scope in the field.

Uploaded by

Sanjana Negi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Group 1 Project report jarvis ai voice assistant

The document presents a mini project report on 'JARVIS: AI Voice Assistant' submitted by students at Alamuri Ratnamala Institute of Engineering and Technology for their Bachelor of Engineering degree. It outlines the project's objectives, background research, system design, and proposed functionalities of the voice assistant, which aims to enhance user interaction through voice commands. The report emphasizes the importance of voice recognition technology and its applicability in various devices and systems, while also addressing existing challenges and future scope in the field.

Uploaded by

Sanjana Negi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

JARVIS: AI Voice Assistant

JARVIS: AI VOICE ASSISTANT


Submitted in partial fulfilment of the requirements
of the degree of

Bachelor of Engineering
by

Mr. BRIJESH DUBEY ARMIET/CS20DB014


Miss. HARSHADA CHAUDHARI ARMIET/CS20CH023
Miss. JAYA NEGI ARMIETCS20NJ017
Miss. SHWETA PANDEY ARMIET/CS20PS026
Under the Guidance of
PROF. ASHWINI VITAKARI

ALAMURI RATNAMALA INSTITUTE OF ENGINEERING


AND TECHNOLOGY

Affiliated to
UNIVERSITY OF MUMBAI

Department of Information Technology


Academic Year – 2021-2022
ALAMURI RATNAMALA INSTITUTE OF ENGINEERING AND TECHNOLOGY
JARVIS: AI Voice Assistant

CERTIFICATE

This mini project report entitled “JARVIS: AI Voice Assistant” by, Mr. Brijesh Dubey,
Miss. Harshada Chaudhari, Miss. Jaya Negi, Miss. Shweta Pandey is approved for the
degree of Bachelor of Engineering in Computer Engineering (Second Year) for academic
year 2021 - 2022.

Examiners

1.

2.

Supervisor

1.

Prof. Ashwini Vitekari

Head of the Department Principal

Date:

Place:

ALAMURI RATNAMALA INSTITUTE OF ENGINEERING AND TECHNOLOGY


JARVIS: AI Voice Assistant

Declaration
I declare that this written submission represents my ideas in my own words and where others'

ideas or words have been included, I have adequately cited and referenced the original sources. I also

declare that I have adhered to all principles of academic honesty and integrity and have not

misrepresented or fabricated or falsified any idea/data/fact/source in my submission. I understand that

any violation of the above will be cause for disciplinary action by the Institute and can also evoke penal

action from the sources which have thus not been properly cited or from whom proper permission has

not been taken when needed.

_______________ _________________ _________________ _________________


Mr. Brijesh Dubey. Miss. Harshada Chaudhari Miss. Jaya Negi Miss. Shweta Pandey

ARMIET/ICS20DB014 ARMIET/CS20CH023 ARMIET/CS20NJ017 ARMIET/CS20PS026

Date:

Place:

ALAMURI RATNAMALA INSTITUTE OF ENGINEERING AND TECHNOLOGY


JARVIS: AI Voice Assistant

Acknowledgement

A mini project is something that could not have been materialized without cooperation of many people.
Thisproject shall be incomplete if I do not convey my heartfelt gratitude to those people from whom I
havegot considerable support and encouragement.

It is a matter of great pleasure for us to have a respected Prof. Ashwini Vitekari as my project guide.
We are thankful to her for being constant source of inspiration.

We would also like to give our sincere thanks to Prof. Mayank Mangal, Head of Department, for their
kind support.
Last but not the least I would also like to thank all the staffs of ARMIET college of Engineering
(Information Technology Department) for their valuable guidance with their interest and valuable
suggestions brightened us.

1) Mr. Brijesh Dubey

2) Miss. Harshada Chaudhari

3) Miss. Jaya Negi

4) Miss. Shweta Pandey

ALAMURI RATNAMALA INSTITUTE OF ENGINEERING AND TECHNOLOGY


JARVIS: AI voice assistant

CONTENTS
CH.
TOPIC NAME PAGE NO.
NO
List of Figures i

List of Table ii

List of Abbreviation iii

INTRODUCTION

1.1 Objective of the Project 6

1.2 Background Research 6


1
1.3 Main Purpose 7

1.4 Future Scope 7

1.5 Applicability 7

SURVEY OF TECHNOLOGY

2.1 Existing System 8


2
2.3 Proposed System 8

2.4 Overall Design 9

REQUIREMENT ANALYSIS

3.1 Problem Definition 10

3.2 Requirement Specification 10


3
3.3 Software Requirements and Hardware Requirements 11

3.3.1 Hardware Requirements 11

3.3.2 Software Requirements 11 -13

1
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

CH.
TOPIC NAME PAGE NO.
NO
SYSTEM DESIGN
4
4.1 Methodology 13

REVIEW OF LITERATURE
5
5.1 Review of Literature 14

UNIFIED MODELING LANGUAGE (UML)

6.1 Flow Chart 15

6.2 Use Case Diagram 16

6 6.3 Class Diagram 17

6.4 Activity Diagram 17

6.5 System Architecture 18

6.6 Block Diagram 18

SYSTEM DESIGN AND IMPLEMENTATION


7
7.1 System Implementation 19-24

RESULTS & OUTPUTS


8
8.1 Results 25-33

CONCLUSION 34

REFERENCES 35

2
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

LIST OF FIGURES

Sr. No. Figure Name Page No.

1 Flow Chart 12

2 Use Case Diagram 13

3 Class Diagram 17

4 Activity Diagram 19

5 System Architecture 20

6 Block Diagram 21

3
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

LIST OF ABBREVIATION

Sr. No. Abbreviation Definition

JUST A RATHER VERY


1 JARVIS
INTELLIGENT SYSTEM

2 GTTS GOOGLE TEXT TO SPEECH

INTEGRATE DEVELOPMENT
3 IDE
ENVIRONMENT

4 AI ARTIFICIAL INTILIGENCE

5 ML MACHINE LEARNING

APPLICATION PROGRAMMING
6 API
INTERFACE
OBJECT ORIENTED
7 OOPS
PROGRAMMING

8 RAM RANDOM ACCESS MEMORY

RAPID APPLICATION
9 RAD
DEVELOPMENT

4
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

ABSTRACT
Voice control is a major growing feature that change the way people can live. The
voice assistant is commonly being used in smartphones and laptops. AI-based Voice
assistants are the operating systems that can recognize human voice and respond via
integrated voices. The voice assistant will gather the audio from the microphone and
then convert that into text, later it is sent through GTTS (Google text to speech).
GTTS engine will convert text into audio file in English language, then that audio is
played using play sound package of python programming Language. Keywords-Voice
control, AI-based Voice Assistant, GTTS Engine, Playsound, Python.

5
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

INTRODUCTION
1.1 Objective of the Project:
This Voice recognition technology is evolving rapidly and is expected to become not only the
default input form for smartphones, but also for cars and other home appliances such as TV and
fridge. Due to the unique features associated with voice input, including an implicit verbalization of
commands, privacy and acceptability issues may affect the usage and adoption voice-bases
 JARVIS is a personal desktop assistant that keeps users informed and productive, helping them
get things done across devices and platforms.
 Skills define the tasks that jarvis can accomplish. You can extend jarvis by adding your own
skills that let your users interact with your service via jarvis.
 Jarvis invokes the skills based on input from the user, spoken.
 Because jarvis can be used in laptop or pc , some may have a screen, while others may have a
speaker, and some may have both. You should ensure that your bot is capable of handling any
of these devices. The bot framework provides device information to your skill
1.2 Background Research:
A voice assistant or intelligent personal assistant is a software agent that can perform tasks
or services for an individual based on verbal commands i.e. by interpreting human speech and
respond via synthesized voices.
Users can ask their assistants’ questions, control home automation devices, and media
playback via voice, and manage other basic tasks such as email, to-do lists, open or close any
application etc with verbal commands.
Who doesn't want to have the luxury to own an assistant who always listens for your call,
anticipates your every need, and takes action when necessary? That luxury is now available thanks
to artificial intelligence-based voice assistants.
Voice assistants come in somewhat small packages and can perform a variety of actions
after hearing your command. They can answer questions, play music, place online orders and do all
kinds of AI-based stuff.
Voice assistants are not to be confused with virtual assistants, which are people who work
remotely and can, therefore, handle all kinds of tasks. Rather, voice assistants are technology based.
As voice assistants become more robust, their utility in both the personal and business realms will
grow as well.
1.3 Main Purpose:
This Software aims at developing a personal assistant for windows-based systems. The main
purpose of the software is to perform the tasks of the user at certain commands, provided in either
of the ways, speech or text. It will ease most of the work of the user as a complete task can be done
on a single command. Jarvis draws its inspiration from Virtual assistants like Cortana for Windows
and Siri for iOS. Users can interact with the assistant either through voice commands or keyboard
input.

6
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

1.4 Future Scope:


 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.
 The mass adoption of artificial intelligence in users’ everyday lives is also fueling the shift
towards voice applications.
 The number of IOT devices such as smart thermostats, appliances, and speakers are giving
voice assistants more utility in a connected user’s life.
1.5 Applicability
The mass adoption of artificial intelligence in users' everyday lives is also fueling the shift
towards voice. The number of loT devices such as smart thermostats and speakers are giving voice
assistants more utility in a connected user's life. Smart speakers are the number one way we are
seeing voice being used. Many industry experts even predict that nearly every application will
integrate voice technology in some way in the next 5 years.
The use of virtual assistants can also enhance the system of loT (Internet of Things). Twenty
years from now, Microsoft and its competitors will be offering personal digital assistants that will
offer the services of a full-time employee usually reserved for the rich and famous.

7
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

SURVEY OF TECHNOLOGY

2.1 Existing System:


The term virtual assistant, or virtual personal assistant, is also commonly used to describe
contract workers who work from home doing administrative tasks typically performed by executive
assistants or secretaries. Virtual assistants are typically cloud-based programs that require internet-
connected devices and/or applications to work. Three such applications are Siri on Apple devices,
Cortana on Microsoft Devices and Google Assistant on Android devices. There are also devices
dedicated to providing virtual assistance. The most popular ones are available from Amazon,
Google and Microsoft. To use the Amazon Echo virtual assistant, called Alexa, users call out the
wake word, "Alexa." A light on the device signals to the user it is ready to receive a command,
which typically involves simple language requests, such as "what is the weather today," or "play
pop music." Those requests are processed and stored in Amazon's cloud. The technologies that
power virtual assistants require massive amounts of data, which feeds artificial intelligence (AI)
platforms, including machine learning, natural language processing and speech recognition
platforms. As the end user interacts with a virtual assistant, the AI programming uses sophisticated
algorithms to learn from data input and become better at predicting the end user's needs.

2.3 Proposed System:


The proposed system will have the following functionality:
(a) The system will keep listening for commands and the time for listening is variable which can be
changed according to user requirements.
(b) If the system is not able to gather information from the user input it will keep asking again to
repeat till the desired no. of times.
(c) The system can have both male and female voices according to user requirements.
(d) Features supported in the current version include playing music, emails, texts, search on
Wikipedia, or opening system installed applications, opening anything on the web browser, etc.
(e)The system will keep listening for commands and the time for listening is variable which can be
changed according to user requirements.
(f) If the system is not able to gather information from the user input it will keep asking again to
repeat till the desired no. of times.
(g) The system can have both male and female voices according to user requirement

8
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

2.4 Overall Design


The overall design of our system consists of the following phases:
(a) Taking input from the user in the form of voice.
(b) Converting the speech into text to be processed by the assistant.
(c) The converted text is now processed to get the required results.
(d) The text contains one or two keywords that determine what query is to be executed. If the
keyword doesn’t match any of the queries’ in the code then the assistant asks the user to speak
again.
(e) The result which is in the form of text is converted to speech again to give results to the user.

9
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

REQUIREMENT ANALYSIS

3.1 Problem Definition:


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 behaviors. They require large amount of 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.

3.2 Requirement Specification:


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/5" code 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 (Al), Machine Learning (ML), natural
language processing, data science etc. Python has a lot of libraries for every need of this project. For
JIA, libraries used are speechrecognition to recognize voice, Pyttsx for text to speech, selenium for
web automation etc.
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

10
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

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.
3.3 Software Requirements and Hardware Requirements:
3.3.1 Hardware Requirements:
 Laptop or Computer

 Processor: Intel core i3

 RAM: 4GB

3.3.2 Software Requirements:


 Platform used: Windows 8/10/11
 Python interpreter(Pycharm, Jython, etc.)
 Python 3.9 or above
 PYTTSX3 :
The pyttsx3 is an offline module that is used for text to speech conversion in Python
and it is supported by both Python 2 & 3.The run and wait functionality is also in
this module only. It determines how much time the system will wait for another input or in
other words the time interval between inputs This is a free module available in the python
community which can be installed using the pip command just like other modules.
 SPEECH RECOGNITION:
The speech recognition module used the program is Google’s Speech Recognition
API which is imported in python using the command “import speech recognition as sr. This
module is used to recognize the voice which is given as input by the Jarvis: AI Voice
Assistant user. This is a free API that is provided and supported by Google. This is a very
light API that helps in reducing the size of our application
 Python Modules
 WEBBROWSER:
This module allows the system to display web-based information to
users. For example, the user wants to open any website and he give input as
“Open Google”. The input is processed using the web browser module and
the user gets a browser with google opened in it. The browser which will be
used is the default set web browser.
 DATETIME:
The Date Time module is imported to support the functionality of the date
and time. For example, the user wants to know the current date and time or the user
wants to schedule a task at a certain time. In short this module supports classes to
manipulate date and time and perform operations according to it only. This is an
essential module, especially in tasks where we want to keep a track of time. This
module is very small in size and helps to control the size of our program. If the
modules are too large or heavy then the system will lag and give slow responses.

11
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

 WIKIPEDIA:
Wikipedia is a library in python which it possible for the virtual assistant to
process the queries regarding Wikipedia and display the results to users. This is an
online library and needs an internet connection to fetch the results. The no. of lines
that the user wants to get as a result can be set Manually

 OS MODULE:
OS Module provides an operating system dependent functionalities. If we
want to perform operations on files like reading, writing, or manipulate paths, all
these types of functionalities are available in an OS module. All the operations
available raise an error “OS Error” in case of any error like invalid names, paths, or
arguments which may be incorrect or correct but just no accepted by the operating
system.

 SELENIUM AUTOMATION TOOL:


Selenium is a free (open source) automated testing suite for web applications
across different browsers and platforms. It is quite similar to HP Quick Test Pro
(QTP now UFT) only that Selenium focuses on automating web-based applications.
Testing done using Selenium tool is usually referred to as Selenium Testing.
Selenium is not just a single tool but a suite of software, each catering to different
testing needs of an organization. The entire Selenium Tool Suite is comprised of four
components:

 Pyjokes
Pyjokes is used for collection Python Jokes over the Internet. To install this
module type the below command in the terminal.

 PyDictionary
PyDictionary is an open-source python library that is used to find the
meaning of the words, translation of words and sentences to different languages, and
other linguistic properties of different words. PyDictionary uses wordnet for the
meanings of the words and search engines for translating the words to different
languages.

12
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

SYSTEM DESIGN
4.1 Methodology:
Voice assistants are all written in programming languages, which listens the verbal
commands and respond according to the user's requests. In this project we have used Python
Programming language to build the AI-based Voice assistant. A user can say, "Play me a
Song" or "Open facebook.com", the voice assistant will respond with the results by playing
that particular song or by opening Facebook website. The Voice assistant waits for a pause
to know that users have finished their request, then the voice assistant sends users request to
its database to search for the request.
 The request asked by the user gets split into separate commands, so that our voice
assistant can able to understand.
 Once within the commands list, our request is searched and compared with the other
requests.
 The commands list then sends these commands back to the Voice assistant.
 Once the voice assistant receives those commands, then it knows what to do next.
 The voice assistant would even ask a question if the request is not clear enough to
process it, in other words, to make sure it understands what we would like to receive.
 If it thinks, it understands enough to process it, the voice assistant will perform the task
which the user has asked for.

13
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

REVIEW OF LITERATURE
5.1 Review of Literature:
This research could be is a chunk of a bigger project concerning virtual voice assistant
briefed by theories in human machine interaction. Moreover speech recognition has a brief history
with numerous waves of innovations. Voice recognition for dictation, hunt and voice command has
become vital feature on personal devices: like wearable devices and smartphone’s. This system was
developed as a humanoid application that confirms the necessity of language rework that sends
messages and also use build-in application by processing the commands given by user to the system.
Importantly smartphone gadget was way quicker followed by other wearable devices; so, many
arrived to introduce in-voice virtual voice assistant with the importance of adopting and applying
multiple smart technologies.
This system has some basic features and most importantly mailing and secondly calendar,
where user has the privilege to mail and able to create their required event by providing voice
commands. For instance, if we use artificial intelligence we can are able to turn off the lights
without the instruction by the user. Almost, Everyone has some knowledge about trending voice
assistant like cortana for windows, and Siri for apple users, this virtual voice assistants aren’t as
brainy and intelligent as Ironman's Jarvis which appear in the superhero movie, but the intended
actions are almost similar by virtual voice assistant. It’s like you need a ask question, and within a
few fraction of seconds you will get an answer. It’s just give a command and get result.

14
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

UNIFIED MODELING LANGUAGE (UML)


6.1 Flow Chart:

15
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

6.2 Use Case Diagram:

16
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

6.3 Class Diagram:

6.5 Activity Diagram:

17
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

6.6 System Architecture:

6.7 Block Diagram:

18
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

SYSTEM DESIGN AND IMPLEMENTATION


7 System Implementation:
I. Jarvis.py
from speech_to_text import *
from text_to_speech import *
from youtube import *
from wikipedia import *
from Movie import *
from dictionary import *
from voice_translator import *

# To take command
instruction = take_command().lower()

# To greet user
if 'hello jarvis' in instruction:
greet()
while instruction != 'close':
# playing music from youtube
instruction = take_command().lower()
if "play music" in instruction:
speak('Which song or artist would you like to play')
print('Which song or artist would you like to play')
name = take_command()
if name == None:
name = take_command()
print("Playing", name, "on Youtube...")
engine.say("Playing")
i = Music()
i.play_music(name)
elif "youtube" in instruction:
speak('Which video would you like to play')
print('Which video would you like to play')
name = take_command()
if name == None:
name = take_command()
print("Playing", name, "on Youtube...")
engine.say("Playing")
i = Music()
i.play_music(name)

# Wikipedia search
# instruction = take_command()
if 'wikipedia' in instruction:
speak('What information you want?')
print('What information you want?')
name = take_command()
while name == None:
name = take_command()

19
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

wiki(name)
elif 'information' in instruction:
speak('What information you want?')
print('What information you want?')
name = take_command()
while name == None:
name = take_command()
print("Searching", name, "on Wikipedia...")
engine.say("Searching")
wiki(name)

# Movie
if "movie" in instruction:
if 'review' in instruction:
review(instruction)
elif 'suggestion' in instruction:
suggestion(instruction)

# Meaning
if 'meaning' in instruction:
m = Meaning()
m.dictionary()

II speech_to_text.py
import speech_recognition as sr
# import text_to_speech as ts
# from web_automation import *

def take_command():
r = sr.Recognizer()
with sr.Microphone() as source:
print("listening...")
r.pause_threshold = 1
audio = r.listen(source)
try:
print("recognizing")
doubt = r.recognize_google(audio, language='en-in')
print("user said : ", doubt)
except Exception as e:
print("say that again please")
return "None"
return doubt

III text_to_speech.py
import pyttsx3 as p
import datetime

20
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

# from web_automation import *

engine = p.init()
def speak(audio):
engine.say(audio)
engine.runAndWait()
def greet():
t = int(datetime.datetime.now().hour)
if t >= 0 and t < 12:
print("Good morning")
engine.say("Good morning")
elif t>=12 and t<18:
print("Good afternoon")
engine.say("Good afternoon")
else:
print("Good evening")
engine.say("Good evening")
engine.say("I am Jarvis your personal assistant")
print("I am Jarvis your personal assistant")
engine.say("What can i do for you?")
print("What can i do for you?")
engine.runAndWait()

IV youtube.py
from selenium import webdriver
import time

class Music():
def __init__(self):
self.driver = webdriver.Chrome()

def play_music(self, name):


driver = self.driver
driver.get(url="http://www.youtube.com/results?search_query="+name)
video = driver.find_element_by_xpath('//*[@id="contents"]')
video.click()
time.sleep(1000)

V Movie.py
from selenium import webdriver
import time

class Movie():
def __init__(self):

21
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

self.driver = webdriver.Chrome()

def movie_review(self, name):


self.driver.get(url="https://www.google.com")
search =
self.driver.find_element_by_xpath('/html/body/div[1]/div[3]/form/div[1]/div[1]/div[1]/div/div[2]/in
put')
search.click()
search.send_keys(name)
search.click()
time.sleep(1)
results =
self.driver.find_element_by_xpath('/html/body/div[1]/div[3]/form/div[1]/div[1]/div[2]/div[2]/div[2]
/ul/li[1]/div/div[2]/div[1]/span')
results.click()
time.sleep(500)

def movie_suggestion(self, name):


self.driver.get(url="https://www.google.com")
search =
self.driver.find_element_by_xpath('/html/body/div[1]/div[3]/form/div[1]/div[1]/div[1]/div/div[2]/in
put')
search.click()
search.send_keys(name)
search.click()
time.sleep(1)
results =
self.driver.find_element_by_xpath('/html/body/div[1]/div[3]/form/div[1]/div[1]/div[2]/div[2]/div[2]
/ul/li[1]/div/div[2]/div[1]/span')
results.click()
time.sleep(500)

def review(name):
m = Movie()
m.movie_review(name)

def suggestion(name):
ms = Movie()
ms.movie_suggestion(name)

VI wikipedia.py
import time
import wikipedia
from text_to_speech import speak
from string import *
# from speech_to_text import take_command

def wiki(doubt):

22
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

# doubt = take_command().lower()
# if 'wikipedia' in doubt:
print("Searching", doubt, "in Wikipedia...")
speak("searching in wikipedia")
# doubt = doubt.replace("wikipedia", take_command())
results = wikipedia.summary(doubt,2)
speak("According to wikipedia")
print(results)
speak(results)
speak('You can have more information on below link')
doubt = str(doubt)
doubt = doubt.replace(' ', '_')
print('https://en.wikipedia.org/wiki/'+doubt)
time.sleep(3)

VII dictionary.py
from PyDictionary import PyDictionary
import speech_recognition as sr
from text_to_speech import *

def take_command():
r = sr.Recognizer()
with sr.Microphone() as source:
print("listening...")
r.pause_threshold = 1
audio = r.listen(source)
try:
print("recognizing")
doubt = r.recognize_google(audio, language='en-in')
print("user said : ", doubt)
except Exception as e:
print("say that again please")
return "None"
return doubt

class Meaning:
def dictionary(self):
# speak = Speaking()
dic = PyDictionary()
speak("Which word do u want to find the meaning sir")

# Taking the string input


query = take_command()
word = dic.meaning(query)
print(len(word))

for state in word:


print(word[state])
speak("the meaning is" + str(word[state]))

23
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

if __name__ == '__main__':
Meaning()
Meaning.dictionary(self=None)

24
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

RESULTS & OUTPUTS


8.1 Results:
1. Main Code

Fig (xiii): Main code(JARVIS)

25
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

2. Greeting

Fig (xiv): Greeting from Jarvis

26
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

3. Play Music

Fig (xv): Play music function call


3.1 Opening YouTube

Fig (xvi): Result of YouTube Command/play music

27
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

4. Movie Review and suggestion command

Fig (xvii): Calling Movie module


4.1 Movie review search result

Fig (xviii): Movie review result

28
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

4.2 Movie suggestion result

Fig (xviii): Movie suggestions results

29
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

5. Jokes

Fig (xviii): Joke result

30
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

6. Wikipedia

Fig (xviii): Wikipedia results

31
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

6.1 Wikipedia

Fig (xviii): Result from generated link

32
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

7. Dictionary

Fig (xviii): Dictionary result

33
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

CONCLUSION
In our project we have implemented many things compared to other assistants. Now a days it
is very useful in human life because it is a hands-free application. It is a very simple application. As
well as it is used in a business field also for example in laboratory, the person wears gloves and body
suits for their safety purpose so it is difficult to type, through voice assistant they can get any
information so that their work becomes easy.

Voice assistants are useful in many fields such as education, daily life application, home
appliances etc. and voice assistant is also useful for the illiterate people they can get any information
just by saying to the assistant, luxury is available for people, thanks to AI based voice assistants.

34
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)
JARVIS: AI voice assistant

REFERENCE

1. Kei Hashimoto1, Junichi Yamagishi2, William Byrne3 Simon King2, Keiichi Tokuda, “An
analysis of machine translation and speech synthesis in speech-to-speech translation system”
proceedings of 5108978-1-4577-0539-7/11/$26.00 2011 IEEE.
2. Arriany A. A., Musbah M. S. Applying voice recognition technology for smart home
networks //Engineering & IS(ICEMIS), International Conference on. – IEEE, 2016. – С. 1-6.
3. M. Fishbein and I. Ajzen, Belief, Attitude, Intention and Behavior: An Introduction to
Theory and Research, Addison- Wesley Publishing Company, Inc.: Reading, 1975. 13. R.
Want and B. N. Schilit, ”Interactive Digital Signage,” in Computer, vol. 45, no. 5, pp. 21-24,
May 2012.
4. Nil Goksel-Canbek Mehmet Emin Mutlu, “On the track of Artificial Intelligence: Learning
with Intelligent Personal Assistant” International Journal of Human Sciences.
5. “Speech recognition with flat direct models,” IEEE Journal of Selected Topics in Signal
Processing, 2010.
6. VINAY SAGAR, KUSUMA SM, "Home Automation Using Internet of Things", June-2015,
IRJET, e-ISSN: 2395 -0056.

 HTTP://J-A-R-V-I-S-THE-DIGITAL-LIFE-ASSISTANT. SOFT112.COM/
 HTTP://JARVIS.AI-DOT.NET/JARVIS.RAR
 HTTP://MICHAELCJARVIS.BLOGSPOT.COM/20...
 VOICE-COMMAND.COM/FORUM.HTML
 https://github.com/Harkishen-Singh/Jarvis-personal-assistant

35
Alamuri Ratnamala Institute of Engineering And Technology (ARMIET)

You might also like