0% found this document useful (0 votes)
43 views31 pages

Ai Virtual Assistant: Karthikeyan R (Urk18Cs120)

This document describes the development of a virtual assistant that can understand speech commands and perform tasks, with the goals of making interactions more user-friendly and automated. The virtual assistant is implemented using speech recognition and text processing modules in Python. Details are provided about adding new commands and a remote access feature.

Uploaded by

steelx691
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)
43 views31 pages

Ai Virtual Assistant: Karthikeyan R (Urk18Cs120)

This document describes the development of a virtual assistant that can understand speech commands and perform tasks, with the goals of making interactions more user-friendly and automated. The virtual assistant is implemented using speech recognition and text processing modules in Python. Details are provided about adding new commands and a remote access feature.

Uploaded by

steelx691
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/ 31

AI VIRTUAL ASSISTANT

A mini project report submitted by

KARTHIKEYAN R (URK18CS120)

in partial fulfillment for the award of the degree of

BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING

under the supervision of

Dr.E.BIJOLIN EDWIN, ASSISTANT PROFESSOR

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

KARUNYA INSTITUTE OF TECHNOLOGY AND SCIENCES


(Declared as Deemed to be University -under Sec-3 of the UGC Act, 1956)
Karunya Nagar, Coimbatore - 641 114. INDIA

MARCH-2021

1|Page Mini Project 2020-2021


DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

BONAFIDE CERTIFICATE

This is to certify that the project report entitled, “AI virtual assistant” is a bonafide record of
Mini Project work done during the even semester of the academic year 2020-2021 by

KARTHIKEYAN R (Reg. No: URK18CS120)

in partial fulfillment of the requirements for the award of the degree of Bachelor of Technology
in Computer Science and Engineering of Karunya Institute of Technology and Sciences.

Submitted for the Viva Voce held on _________________

Project Coordinator Signature of the Guide

2|Page Mini Project 2020-2021


ACKNOWLEDGEMENT

First and foremost, I praise and thank ALMIGTHY GOD whose blessings have bestowed

in me the will power and confidence to carry out my project.

I am grateful to our beloved founders Late.Dr. D.G.S. Dhinakaran, C.A.I.I.B, Ph.D and

Dr. Paul Dhinakaran, M.B.A, Ph.D, for their love and always remembering us in their prayers.

I extend my thanks to our Vice Chancellor Dr.P. Mannar Jawahar, Ph.Dand our

Registrar Dr. Elijah Blessing, M.E., Ph.D,for giving me this opportunity to do the project.

I would like to thank Dr. Prince Arulraj, M.E., Ph.D.,Dean, School of Engineering and

Technology for his direction and invaluable support to complete the same.

I would like to place my heart-felt thanks and gratitude toDr. J. Immanuel John Raja,

M.E., Ph.D.,Head of the Department,Computer Science andEngineering for his encouragement

and guidance.

I feel it is a pleasure to be indebted to, Mr. J. Andrew, M.E, (Ph.D.), AssistantProfessor,

Department of Computer Science and Engineering and Dr.E.BIJOLIN EDWIN, ASSISTANT

PROFESSOR for their invaluable support, advice and encouragement.

I also thank all the staff members of the Department for extending their helping hands to

make this project a successful one.

I would also like to thank all my friends and my parents who have prayed and helped me

during the project work.

3|Page Mini Project 2020-2021


CONTENTS

Acknowledgement i
Abstract ii

1. Introduction
1.1 Introduction 6
1.2 Objectives 6
1.3 Motivation 7
1.4 Literature Review 7
1.5 Methodology 8
1.6 Overview of the Project 9
1.7 Chapter wise Summary 9
2. Analysis and Design 10
2.1 Functional Requirements 10
2.2 Non-Functional Requirements 10
2.3 Architecture 11
2.4 Use case diagram 12
2.5. Sequence Diagram 14

3. Implementation 15
3.1. Modules Description 16
3.2. Implementation Details 17
3.3. Tools used 26

4. Test results/experiments/verification. 27
4.1. Testing 28
4.2. Results 29
4.3. Verification 29
5. Conclusions and Further Scope 30

References 31

4|Page Mini Project 2020-2021


ABSTRACT
In the 21st century, everything is automated including the things we use daily washing
machines, dishwashers, refrigerators, bus, doors, air condition systems, turning everything in
a single click, etc. In this busy world the present study proposes the new concept of voice
controlled devices that recognize user’s voice; process the request and assigns the time and
date of the appointment based on the request with details as name of the person; date; time
and other related information .Human computer communication has growing demand on
recent days. In this generation technology gives computer interfaces emotional states that
relate to humans. Recent developments in smart assistants are lately attracting the interest
and curiosity of consumers and researchers. Speech recognized virtual assistants offer a wide
variety of user friendly services and in some cases can connect to home and work
environments, thus enhancing them with new and effective user interfaces. However, such
programs also reveal new needs and some weaknesses. As a consequence, the interaction is
impaired and, in some cases, ineffective. Moreover, most of the artificial devices heavily rely
on cloud services, thus transmitting potentially retrieve a data to remote servers. To
overcome such issues, in this paper we combine some of the most advanced techniques in
computer vision, speech generation and recognition, and artificial intelligence, into a virtual
assistant programs for personal computers . The proposed assistant is effective and resource-
efficient, interactive and customizable, and the realized prototype runs on a low-cost, run on
any operating system. But the main problem in this multi-model expression is that the
hardware control given to the Artificial Intelligence (AI) is very limited. So, in our project
we are trying to give the Artificial Intelligence (AI) more control on the hardware. There are
two main parts such as Speech recognition and Text recognition engines are used accomplish
the requirement. By the use of this we are going to do the tasks which the input given by user
giving commands via speech makes it user friendly. This paper describes the representation
of the program along with the implementation of this system. Details about the addition of
new commands and additional feature of remote access that makes it different from others
are also mentioned. In this work, we are using a speaker and a mic as hardware and for the
programming part, we are using python scripting and a compiler.

5|Page Mini Project 2020-2021


1. INTRODUCTION

1.1 INTRODUCTION

In today’s era almost all tasks are digitalized. We have Smartphone in 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. Well, I had a thought before I
started making my very own “Virtual Assistant”. Though it is not as capable and high as like
Amazon’s Alexa or Google Assistant, Home or Apple’s Siri or JARVIS from Iron Man.
Nowadays, People are troubled by typing commands into the computer. Be it procrastination or a
busy schedule. Typing is a big obsolete process. The solution to this is that we switch over to an
assistant which understands us and do the initial work for us.
It also supports specialized task such as booking a flight, or finding cheapest book online from
various e-commerce sites and then providing an interface to book an order are helping automate
search, discovery and online order operations. An assistant is the best replacement for typing
commands t his 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.

1.2 OBJECTIVES

A virtual assistant is a skilled professional who can assist you with those mundane tasks
which are time-consuming and repetitive in nature. Virtual assistants are a shared resource,
which means they can work with multiple tasks handling a wide variety of tasks for each of
them. A virtual assistant can play the role of an online research assistant, social media assistant,
administrative assistant, travel assistant, email assistant, among others.

Here are some of the goals that virtual assistant fulfills:

Online research assistant: Conduct online research pertaining to a product, company or


industry and provide the client with the required information.

Social media assistant: Set up and manage social media accounts, schedule and post
relevant content, answer queries, moderate comments on behalf of the client.

6|Page Mini Project 2020-2021


Administrative assistant: Manage calendar of the client by scheduling meetings,
coordinating with attendees, set up reminders for meetings, etc.

Travel assistant: Create itineraries for the client including required travel and hotel
accommodations, provide recommendations for cultural events, restaurants, etc.

Email assistant: Manage inbox by replying on behalf of the client, setting rules and
filters for emails, etc.

These are only some of the roles and responsibilities that our virtual assistants handle
successfully on a daily basis. We will discuss more about following topics.

1.3 MOTIVATION

A virtual assistant typically operates from a home, office but can access the necessary
planning documents, such as shared calendars, remotely. The main motivation of the
project is reduce the time of users and increase the efficiency in a easy way.There’s
no need to buy a costly home assistants or any virtual assistants its cheaper and gives
good perfomance. Virtual assistant are best for small scale business even for the large
business. But large business always have strong budget they always having a option
but when you come to small scale business they having low budget and have to make
everything in time and perfect.As a small scale or personal virtual assistant will be
there for you like a personal assistant only better - available around the clock, experts
in various fields that you can make use of, they do everything from business tasks to
personal errands, helps a lot when you are really busy or running out of time or
simply don’t need to put in the effort yourself or appointing a person for your
personal. Your business is growing more and more and you are busier now more than
ever. You could use an extra set of hands for handling client’s call in a professional
manner and provide you instant support staff service. It’s all are motivations and then
we are going to discuss about overview of the projects and implementations.

7|Page Mini Project 2020-2021


1.4 LITERATURE REVIEW

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 smart
phone’s This system has International Research Journal of Engineering and Technology
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 given by the user. Almost, everyone has some knowledge about trending voice
assistant like cortana for windows, and Siri for apple users, these 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 given a
command and gets result.

1.5 METHODOLOGY

Virtual Personal Assistance works on real time, as its give the required output
instantaneously. As we give the command to it via the mic the speech or command that we
have given is first processed and then it is converted to text, then form the text the keys
words are extracted and then check with the modules which is stored in the local hard drive,
if the keywords match with any of the modules then that particular module will be executed,
if the key word doesn’t matches with any of the modules than it will just tell the use to try
again or it didn’t understand what the user wants. As we are using speech recognition as out
speech to text converter, we get the option to store the conversation that we had with our
Virtual Personal Assistance and we can use it later to make more modules easily. We divide
methodology in two parts: knowledge abstraction and implementation. Knowledge
abstraction has to do with the analysis of course content (which we will call data). On the
other hand, implementation depends on the characteristics of the data generated in the
process of knowledge abstraction, and also, it depends on the features of the tools available
for Dialogflow and its various integrations finally testing is executed.

8|Page Mini Project 2020-2021


1.6 OVERVIEW OF THE PROJECT

Virtual assistants are typically cloud-based programs that require internet-connected


devices or applications to work. A virtual assistant, also called AI assistant or digital
assistant is an application program that understands natural language voice commands
and completes tasks for the user. Such tasks, historically performed by a personal
assistant or secretary, include taking dictation, reading text or email messages aloud,
looking up phone numbers, scheduling, placing phone calls and reminding the end
user about appointments..Virtual assistants are quickly evolving to provide more
capabilities and value to users. As speech recognition and natural language processing
advances, so too will a virtual assistant's ability to understand and perform requests.
And as voice recognition technology improves, virtual assistant use will move deeper
into business workflows. The concept behind the virtual assistant is convert a speech
into programs and complete the task By the use of programming in this project we
used python scripts

1.5 CHAPTER WISE SUMMARY

Above all the topics we discussed about how the project is created and what’s the
purpose of the project. Then we are going to study about the materials used in a
project ,implementation process and control systems case diagrams and python
programming and how virtual assistant designed .And briefly discuss about artificial
intelligence and test our programs which it will work or not and verify the process.

After installation and programs are verified successfully we are going to discuss
about future of the process and how to improve our model also how to add someof the
features into our virtual assistant.

9|Page Mini Project 2020-2021


2.ANALYSIS AND DESIGN

2.1 FUCTIONAL REQUIREMENTS

● Operating systems like windows,linux…


● Proper Internet Connection
● Pycharm software install
● Python 3.8(version used in this project)
● pyttsx3
● PyAudio install
●pip3 install wheel
● sapi5 included
● PyAudio installed
● pip install wikipedia
● Speech recognition installed
● pip install web browser
● Python compiler
● Mplayer for voice support (Text-to-Speech)
● Chromium-based browser, like Chrome, Edge

2.2 Non-Functional Requirements:

The non-functional requirements of the system include:


● The system ensures safety, security and usability, which are observable during operation (at
run time).
● The system is adaptable to different situations
. ● The project has good and compact UI using python 3.8 with responsive interface.
● The project is light on resources.

10 | P a g e Mini Project 2020-2021


2.3 ARCHITECTURE

Figure-1(Architecture diagram.1)

11 | P a g e Mini Project 2020-2021


Figure-2

Figure-3

12 | P a g e Mini Project 2020-2021


2.4 USE CASE DIAGRAM
This is the use Case Diagram captures the system's functionality and requirements by using
actors and use cases. Use Cases model the services, tasks, function that program needs to
perform. Use cases represent high-level functionalities and how a user will handle the program in
a system

Fig-4(Use case diagram)

13 | P a g e Mini Project 2020-2021


2.5 SEQUENCE DIAGRAM

A sequence diagram is an interaction diagram that shows how objects operate with one another
and in what order. It is a construct of a message sequence chart.
A sequence diagram shows object interactions arranged in time sequence. It depicts the objects
and classes involved in the scenario and the sequence of messages exchanged between the
objects needed to carry out the functionality of the scenario

Figure-5(Sequence diagram)

14 | P a g e Mini Project 2020-2021


Figure-6(Sequence diagram)
This diagram helps us to understand the sequence in which the activities are performed

Figure-7

15 | P a g e Mini Project 2020-2021


Figure-8

After the program is successful the mic starts and it waits for user to speak, when the mic
receives the data it converts the data into the text format. The text is then matched with the action
which is to be performed. Action is performed.

16 | P a g e Mini Project 2020-2021


3.IMPLEMENTATION

3.1 MODULES DESCRIPTION


A virtual assistant is working on a artificial way who provides administrative services to clients
while they are busy in office. This virtual assistant typically operates out easy work and access
the necessary planning documents, such as shared calendars, remotely. A virtual assistant is a
self-employed worker who specializes in offering administrative services to clients from a
remote location, usually a home office.
Typical tasks a virtual assistant might perform include scheduling appointments, making phone
calls, making travel arrangements, and managing your email accounts.
Some virtual assistants specialize in offering bookkeeping, social media, and marketing
services.
For an user, one advantage of using a virtual assistant is the flexibility to contract for just the
services they need and zero cost with high efficiency.
The specific duties of a virtual assistant vary according to the needs of the user and the terms of
the user’s condition. Some virtual assistants handle clerical and bookkeeping tasks, while others
may post regular updates to social media or reading articles for a blog. A well-rounded virtual
assistant may also handle travel arrangements, appointment scheduling, data entry, and online
file storage.
For small business owners, hiring a virtual assistant can help them free up valuable hours to
focus on growing the business and generating revenue. It can be easier and more cost-effective to
outsource tasks that are tedious and time-consuming to someone who is skilled at them.
A computer primarily based approach for performing a command via a voice consumer interface
on a subset of objects. The subset is selected from a fixed of items, each having an object type at
least one taggable field is associated with the object type and has a corresponding value. The set
of objects is saved in the laptop memory. An utterance is acquired from the person and consists
of a command, an object type choice, a tag-gable field selection, and a price for the taggable
discipline. Responsive to the utterance, at least one item is retrieved from the set of gadgets, the
item of the sort selected through the user and having a price within the taggable area selection
that matches the taggable field fee obtained from the user the command is done on the item. The
object includes textual content that’s converted to voice output [1]. They envisioned that

17 | P a g e Mini Project 2020-2021


someday computers will recognize natural language and count on what we need, whilst and
where we need it, and proactively whole responsibilities on our behalf

3.2 IMPLEMENTATION DETAILS

3.2.1 Setting up the environment to code:


The first and foremost thing for an A.I. assistant is to speak. To make our bot(virtual assistant)
talk, we will code a speak() function. This function will take audio as an argument, and then, it
will pronounce it.

Now, I will start by stating what I want this program to do. This program will run specific
commands once a wake word is given by the user’s voice. This program will then execute those
commands audibly back to the user.

3.2.2The commands to be executed are as follows:

1. Say the greeting when user run the program.


2. Get the date for the user
3. Get the time for the user
4. Get information about a person to the user (using Wikipedia)
5. Get the browser command to the user.
6. Use mail command to the user.
7. Get weather command for the user.
8. Search online command for user.
9. Get the open file for user.
10. Get song name for user to play a song.
11. Use shutdown for user

For example, the user may say ‘Hey assistant, what’s the time now?’ or ‘what’s today’s date?’
and the virtual assistant will respond accordingly.

Now, let’s write a short description of what this program is going to do in comments.

18 | P a g e Mini Project 2020-2021


3.2.3 INSTALLING PACKAGES
We need to install the packages according to our program,

pip install PyAudio


pip install Speech Recognition
pip install Wikipedia
pip install pyttsx3
pip install webbrowser
pip install date
pip install os
pip install selenium
pip install smtplib
pip install json

Next import some of the libraries that will be important for this program. We will use the
warnings library to ignore the some of the error we get in this program. The library speech
recognition is used to recognize speech.
The os library will allow us to interact with the Operating System. The gtts library will help us
convert text to speech. The Wikipedia library will allow us to get information about a person
from Wikipedia. The date time library will allow us to get the current date and time. The
calendar library will allow us to get the day of the week, and the random library will be used for
randomization

Speech Recognition is an important feature in several applications used such as home


automation, artificial intelligence, etc. Recognizing speech needs audio input, and
SpeechRecognition makes it really simple to retrieve this input. Instead of building scripts from
scratch to access microphones and process audio files, SpeechRecognition will have you up and
running in just a few minutes. To access your microphone with Speech Recognizer, you’ll have
to install the PyAudio package.A python library which will help us to convert text to speech. In
short, it is a text-to-speech library. It works offline, and it is compatible with Python 2 as well the
Python 3.

19 | P a g e Mini Project 2020-2021


3.2.4 Create Functions
We will start creating helpful functions that will make the code look clean and execute certain
commands.

First we need a function that can take in audio (a voice command) and recognize the speech, then
return that speech as a string (text). Let’s call this function recordAudio()

def speak(audio):
rate = engine.getProperty('rate')
newVoiceRate = 190
engine.setProperty('rate', newVoiceRate)
engine.say(audio)
engine.runAndWait()

We now have a function to record the audio. Let’s create a another function for the program to
respond back to the user audible and call it assistantResponse(). The function will take in a
string (text) and convert it to audio. I will also have this function print the text to the screen for
testing purposes. Selenium Web Driver is a collection of open source APIs which are used to
automate the testing of a web application. This tool is used to automate web application testing
to verify that it works as expected. It supports many browsers such as Safari, Firefox, IE, and
Chrome.

3.2.5 Defining takeCommand function:


The next most important thing for our virtual assistant is that it should be able to take command
with the help of the microphone of our system. So, now we will code a takeCommand()
function.

With the help of the takeCommand() function, our virtual assistant will be able to return a string
output by taking microphone input from our audio.

20 | P a g e Mini Project 2020-2021


Let’s start coding for our takeCommand() function:

def takecommand():
r = sr.Recognizer()
with sr.Microphone() as source:
print("Listening...")
r.pause_threshold=0.8
audio=r.listen(source)
try:
print("Recognizing...")
query = r.recognize_google(audio)
print(f"User Said: {query}\n")
except Exception as e:
print("Say that again please...")
return "None"
return query
speak(audio):

3.2.6 GENERATE TASKS

Current time

hour = int(datetime.datetime.now().hour)
if hour>=0 and hour<12:
speak ("Good Morning sir")

elif hour>=12 and hour<18:


speak("Good Afternoon sir")
else:
speak("Good Evening sir")

In the above code, we are using datetime() function and storing the current time of the system
into a variable called strTime.

After storing the time in strTime, we are passing this variable as an argument in speak function.
Now, the time string will be converted into the speech.

21 | P a g e Mini Project 2020-2021


Send Email: We are going to import smtplib to send emails with Python.

Simple Mail Transfer Protocol (SMTP) is a protocol that allows us to send emails and to
route emails between mail servers.

An instance method called send mail is present in the SMTP module. This instance method
allows us to send an email.

It takes 3 parameters:

The sender: Email address of the sender.

The receiver: Email of the receiver.

The message: A string message which needs to be sent to one or more than one recipient.

Now, we will create a sendEmail() function, which will help us to send emails to one or more
than one recipients.

def sendEmail(to, content):

server =smtplib.SMTP('smtp.gmail.com',587)

server.ehlo()

server.starttls()

server.login('[email protected]','karthik007@')

server.sendmail('[email protected]',to,content)

server.close()

peak(audio):

Note that, in a nutshell, goggle is not allowing you to log in via smtplib because it has flagged
this sort of login as "less secure", so what you have to do is go to this link while you're logged in
to your goggle account, and allow the access.

22 | P a g e Mini Project 2020-2021


Search something on Wikipedia: Now we are going to develop Wikipedia searches,
for that we need to install and import the Wikipedia module into our program.

Installing Wikipedia module:

Pip install wikipedia

After successfully installing wikipedia module, import the wikipedia module into the program by
writing an import statement.

if "tasks" in query or "can" in query or "what


actions" in query:

taskperformlist()

elif 'wikipedia' in query:

speak('searching wikipedia...')

query = query.replace("wikipedia", "")

results=wikipedia.summary(query, sentences=2)

speak("According to Wikipedia")

print(results)

speak(results)

In the above code, we have used an if statement to check whether Wikipedia is in the search
query of the user or not. If Wikipedia is found in the user’s search query, then two sentences
(which you can change by changing the number of sentences from 2 to any number you want)
from the summary of the Wikipedia page will be converted to speech with the help of the speak
function. After identify the specific information it will add the word “According to Wikipedia”.

23 | P a g e Mini Project 2020-2021


Open YouTube in web-browser: To open any website, we need to import a package
called web browser. But it is an in-built module, and we do not need to install it with pip
statement, we can directly import it into our program by writing an import statement.
elif 'youtube' in query or 'open youtube.com' in query:
webbrowser.open("https://www.youtube.com")
speak("Opening youtube")

Here, we are using the elif loop to check whether the Youtube is in the query of the user or not.
Let’ suppose, the user gives a command as “Please, open youtube.”

So, open youtube will be in the user’s query, and the elif condition will be true.

Open Google :We are going to import web browser module in Python which provides an
interface to display Web-based documents. While we are saying commands, PyAudio detect
availability of these commands by matching them. Python has a built-in package called re, which
can be used to work with Regular Expressions.

import re
import webbrowser

if 'open google' in command:


#matching command to check it is available
reg_ex = re.search('open google (.*)', command)
url = 'https://www.google.com/'
if reg_ex:
subgoogle = reg_ex.group(1)
url = url + 'r/' + subreddit
webbrowser.open(url)
print('Done!')

The re.search() method takes a regular expression pattern and a string and searches for that
pattern within the string. If the search is successful, search() returns a match object or None
otherwise. Therefore, the search is usually immediately followed by an if-statement to test if the
search succeeded

The code reg_ex = re.search('open google (.*)', command) stores the search result in a variable
named "reg_ex". Then the if-statement tests the match -- if true the search succeeded and group()
is the matching text. Otherwise if the match is false (None to be more specific), then the search

24 | P a g e Mini Project 2020-2021


did not succeed, and there is no matching text. The 1 in reg_ex.group(1) represents the first
parenthesized subgroup.

Weather Query If you live in a place where the weather can change on a dime, you may find
yourself searching for the weather every morning to ensure that you are adequately equipped
before leaving the house. This can eat up significant time in the morning, especially if you do it
every day, when the time can be better spent taking care of other things.

To implement this within our digital assistant, we’ll add another if statement that recognizes the
phrase “What is the weather in..?”

if "what is the weather in" in data:


listening = True
api_key = "Your_API_key"
weather_url = "http://api.openweathermap.org/data/2.5/weather?"
data = data.split(" ")
location = str(data[5])
url = weather_url + "appid=" + api_key + "&q=" + location
js = requests.get(url).json()
if js["cod"] != "404":
weather = js["main"]
temp = weather["temp"]
hum = weather["humidity"]
desc = js["weather"][0]["description"]
resp_string = " The temperature in Kelvin is " + str(temp) + "
The humidity is " + str(hum) + " and The weather description is "+ str(desc)
respond(resp_string)
else:
respond("City Not Found")

25 | P a g e Mini Project 2020-2021


3.3 TOOLS USED

1.An up-to-date computer with 100 GB storage space and above.

2.Updated version of Windows and MS Office Suite.

3. An email account.

4.Scikit Learn

5.TensorFlow

6.Pycharm

7.MxNet

8.Keras

9.PyTorch

10.CNTK

11.Webbrowser

12.PyAudio

13. Speech recognition installed

14 pip install web browser

15 Python compiler

26 | P a g e Mini Project 2020-2021


4.TEST RESULTS AND VERIFICATION

4.1 TESTING

The testing process is the most important part in our project here we going to execute the code
and give the commands in the users point of view and next verify process here we will the
assistant is working properly or not. Here user said open goggle keyword to the program and it
will recognize the speech and converted into text then start the operation as per the program.

Figure-9

Next command is open you tube and it will recognize the command then executed the specific
operation.

Figure-10

This is the command about corona virus report and it will open the corona virus page.

Figure-11
27 | P a g e Mini Project 2020-2021
4.2VERIFICATION

Figure-12(This is the first output of the command we gave “open youtube”)

Figure-13(Here it’s the output for the google command it will executed and open google.co.in)

Figure-14(It is the output for coronavirus report)

28 | P a g e Mini Project 2020-2021


RESULTS

When the application is executed it starts remote module in background. When it gets the
command it first tries to match the input with the commands stored in the Ms-Access database if
matched it executes the command accordingly. If not then it check the command for some
hardcoded flows of matched then the relevant output is given to user

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 open entertainment tasks . We aim to make this project a complete assistant
and make it smart enough to act as a replacement for a general server administration. The future
plans include integrating this with mobile using React Native to provide a synchronized
experience between the two connected devices. Further, in the long run, it is planned to feature
auto deployment supporting elastic, backup files, and all operations which a general Server
Administrator does. This project describes the approach that is used to develop a personal
assistant. All the technical and implementation details are described to understand the system
better. Most of the basic features needed regularly are implemented though a number of
additional features can be added. Thus we have developed a personal assistant such that all most
of the user tasks are now implemented at the users command easily . In the end, to achieve the
final stage and all these improvements to the new system with high accuracy, we need funding
from an organization that will work with us to improve the system by funding the new hardware
devises that have high accuracy, as well as the tools and cloud severs that we will need for
testing the new system. Though a number of assistants are available in the market for smart
phones, personal assistants for PCs (Windows) are not that popular in our country. An additional
feature of remote access eradicates the limitation of area within which the system can be
accessed. User can now handle PC (Windows) from mobile or other system through a website.
This paper describes the approach that is used to develop a personal assistant. All the technical
and implementation details are described to understand the system better. Most of the basic
features needed regularly are implemented though a number of additional features can be added.
Thus we have developed a personal assistant such that all most of the user tasks are now
implemented at the users command easily and quickly.

29 | P a g e Mini Project 2020-2021


FURTHER SCOPE

Virtual assistants are growing to be prevalent in our day to day lives. Due to good outreach of
smart phones and laptops many of us own at least one virtual assistant in our system it may be
Siri on iPhone or Google Assistant on Android phones. Cortana also has a good reach due to
wide users of Windows 10 and Alexa as a home speaker. All of the 100 users were provided with
the same set of questions which they were supposed to ask to all the four personal assistants.
Survey on Virtual Assistant: Google Assistant, Siri, Cortana, Alexa 199answer and how many
they got right. From whole scenario it nearly came to conclusion that recognizing voice required
number of large different variations such as environment, voice modulation, frequency etc. Main
challenge for voice recognition is that people’s voices vary and they speak in different ways and
in different number of languages. All the IVAs are evolving over time. While all the four IVAs
were capable of answering nearly 17.35% of daily based questions, only Google Assistant was
found to be most efficient by answering 59.80% of the question. Contrary to the expectations,
Siri brought a bit of disappointment by answering only 45%. Whereas Cortana could only cover
one third of the questions. Alexa loss the race badly by only answering 7.91%. That was surely a
terrible defeat. According to our survey, IVAs have quite a poor retention rate, with only 25% of
frequent day to day life users. Alexa, Google Assistant, Siri, and Cortana are at good pace for
betterment over years. It’s quite likely that one day they will actually meet our expectations.
IVA’s are of broader benefits for future then they appeared to be. There is a large portion of
people from disabled community mostly with cognitive disabilities who may have hard time in
forming full sentences and communication, for such people personal assistant can be a deal
breaker. Though there is the place for enhancement in all tested devices new studies can be
conducted and the potential of IVAs can be tested in various untouched areas like education,
banking, business, counseling, sales etc. And also a merger of these devices with various
machine learning technologies and algorithms may give birth to different new possibilities.When
the application is executed it starts remote module in background. When it gets the command it
first tries to match the input with the commands stored in the Ms-Access database if matched it
executes the command accordingly. If not then it check the command for some hardcoded flows
of matched then the relevant output is given to user.

30 | P a g e Mini Project 2020-2021


REFERENCES

1. Jan Vossaert, Vincent Naessens, Laurens Lemaire “Secure Remote ccess to an Industrial
Generator with Mobile evices” World Con ress on Industrial Control Systems Security
(WCICSS-2015)
2. Chung, H., Iorga, M., Voas, J., Lee, S.: Alexa, can I trust you? In: 2017 IEEE Computer
Security (2017)
3. Lopez, G., Quesada, L., Guerrero, L.A.: Alexa vs Siri vs Cortana vs Google assistant: a
comparison of speech-based natural user interfaces. Conference Paper, January 2018.
4. Kepuska, V., Bohouta, G.: Next generation of virtual personal assistants (Microsoft
Cortana, Apple Siri, Amazon Alexa and Google Home). In: IEEE Conference (2018)
5. https://www.geeksforgeeks.org/build-a-virtual-assistant-using-python/
6. https://www.geeksforgeeks.org/voice-assistant-using-python/
7. https://www.geeksforgeeks.org/building-app-for-google-assistant-without-any-coding/
8. https://www.investopedia.com/terms/v/virtual-assistant.asp
9. https://www.analyticsvidhya.com/blog/2020/09/ai-virtual-assistant-using-python/
10. angeeta Mishra, Rohit Kankal, Sudeep Lunawat, Prashant Ram, Vivek Gupta,
“Interactive Automation Interface using android app and Speech Recognition over
wireless LAN and Internet”, International Conference & Workshop on Electronics &
Telecommunication Engineering (ICWET), February 2016.
11. G B Karan, Dhananjay Kumar, Kiran Pai, J. Manikandan, “Design of a phoneme based
voice controlled home automation system”, IEEE International Conference on Consumer
Electronics-Asia (ICCE-Asia), October 2017.
12. Ayush Panwar, Anandita Singh, Renu Kumawat, Siddharth Jaidka, Kumkum Garg,
“Eyrie smart home automation using Internet of Things”, Computing Conference, July
2017.

31 | P a g e Mini Project 2020-2021

You might also like