Final Document
Final Document
Final Document
1
CONTENTS
INTRODUCTION 4
1.1 ORGANIZATION PROFILE 4
SYSTEM STUDY 11
2.1 EXISTING SYSTEM 11
CONCLUSION 23
BIBLIOGRAPHY 24
APPENDICES 25
A. DATA FLOW DIAGRAM 25
B. DATABASE TABLE 27
C. SAMPLE CODE 29
D. SAMPLE INPUT 38
V
E. SAMPLE OUTPUT 45
2
1.INTRODUCTION
3
man him, part-by-part their research and experiments. As science and technology
progressed, medicine became an integral part of the research. Gradually, medical
science became an entirely new branch of science. As of today, the Health Sector
comprises of Medical institutions ie. Hospitals, HOSPITALS etc. research and
development institutions and medical colleges. Thus the Health sector aims at
providing the best medical facilities to the common man.
4
1.2.1 HARDWARE ARE CONFIGURATION
PROCESSOR : INTEL
RAM : 8GB
5
PYTHON
Python is a computer programming language often used to build websites and software,
automate tasks, and conduct data analysis. Python is a general-purpose language, meaning it
can be used to create a variety of different programs and isn’t specialized for any specific
problems. This versatility, along with its beginner-friendliness, has made it one of the most-
used programming languages today. A survey conducted by industry analyst firm Red Monk
found that it was the second-most popular programming language among developers in 2021.
Python is commonly used for developing websites and software, task automation, data
analysis, and data visualization. Since it’s relatively easy to learn, Python has been adopted by
many non-programmers such as accountants and scientists, for a variety of everyday tasks, like
organizing finances.
Python can build a wide range of different data visualizations, like line and bar graphs,
pie charts, histograms, and 3D plots. Python also has a number of libraries that enable coders to
write programs for data analysis and machine learning more quickly and efficiently, like
TensorFlow and Kera’s.
Python is often used to develop the back end of a website or application—the parts that
a user doesn’t see. Python’s role in web development can include sending data to and from
servers, processing data and communicating with databases, URL routing, and ensuring
security. Python offers several frameworks for web development. Commonly used ones include
Django and Flask.
6
FEATURES OF PYTHON
1. Easy to Code
2. Easy to Read
Python code looks like simple English words. There is no use of semicolons or
brackets, and the indentations define the code block. You can tell what the code is supposed
to do simply by looking at it.
Python has an extensive standard library available for anyone to use. This means that
programmers don’t have to write their code for every single thing unlike other programming
languages. There are libraries for image manipulation, databases, unit-testing, expressions
and a lot of other functionalities. In addition to the standard library, there is also a growing
collection of thousands of components, which are all available in the python package index.
5. Interpreted
7
When a programming language is interpreted, it means that the source code is
executed line by line, and not all at once. Programming languages such as C++ or Java are
not interpreted, and hence need to be compiled first to run them. There is no need to compile
Python because it is processed at runtime by the interpreter.
6. Portable
Python is portable in the sense that the same code can be used on different machines.
Suppose you write a Python code on a Mac. If you want to run it on Windows or Linux later,
you don’t have to make any changes to it. As such, there is no need to write a program
multiple times for several platforms.
8. Extensible
9. Expressive
Python needs to use only a few lines of code to perform complex tasks. For example,
to display Hello World, you simply need to type one line - print (“Hello World”). Other
languages like Java or C would take up multiple lines to execute this.
8
One of the key aspects of any programming language is support for GUI or Graphical
User Interface. A user can easily interact with the software using a GUI. Python offers
various toolkits, such as Tkinter, wxPython and JPython, which allows for GUI's easy and
fast development.
Many programming languages need to declare the type of the variable before runtime.
With Python, the type of the variable can be decided during runtime. This makes Python a
dynamically typed language.
For example, if you have to assign an integer value 20 to a variable “x”, you don’t need to
write int x = 20. You just have to write x = 15.
Python can be used to develop both desktop and web apps and complex scientific and
numerical applications. Python's data analysis features help you create custom big data
solutions without so much time and effort. You can also use the Python data visualization
libraries and APIs to present data in a more appealing way. Several advanced software
developers use Python to accomplish high-end AI and natural language processing tasks.
9
Python contains several advanced programming features such as generators (used to
create iterators with a different approach that most other languages) and list
comprehensions (used to create new lists from other iterables). Python also has automatic
memory management eliminating the need to manually allocate and free memory in the code.
10
2. SYSTEM STUDY
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.1.1 DRAWBACKS
Virtual assistants have a variety of privacy concerns associated with them. Features
such as activation by voice pose a threat; as such features require the device to always be
listening. However, such features are important to make devices accessible for people who
may otherwise have trouble. Modes of privacy such as the virtual security button have been
proposed to create a multilayer authentication for virtual assistants.
Cortana, for example, works best by using data from a user's device, including emails
and other communications, a user's contacts, location data, search history, and data from
other Microsoft services and skills -- third-party applications -- that users choose to connect
11
with. Users can choose not to sign in and share this data with Cortana, and adjust permissions
to prevent certain data from being collected, though these actions limit the virtual assistant's
usefulness. These virtual assistants require large amounts of personal data and are always
"listening" in order to respond to voice commands. Virtual assistants then retain voice
interactions and personal information to improve the user experience. Virtual assistant
providers also maintain privacy policies, which define how each company uses and shares
personal information. In most cases, companies do not share customer-identifiable
information without a customer's consent.
To design a device that acts as a digital organizer to provide variety of services to its
master. It will look at examples of intelligent programs with natural language processing that
are currently available, with different categories of support, and examine the potential
usefulness of one specific piece of software as a VPA. It continues to expand its digital
abilities in organizing events, ordering food, playing music, guiding services for travelling,
game prediction etc. It is suggested that new technologies may soon make the idea of virtual
personal assistants a reality. Experiments conducted on this system, combined with user
testing, have provided evidence that a basic program with machine learning algorithms in the
form of a digital personal assistant. Using machine learning algorithms to iteratively learn
user’s preference for each theme based on quality feedback given by the user. The concept of
a virtual assistant which is a digital service looking after a range of our needs is fast
becoming a reality. As artificial intelligence and machine learning progress at pace, digital
assistants are set to become our gateway to the internet and know more about us than we do
ourselves. Siri and Google now are just the beginning. The device accepts voice input
processes it through various machine learning algorithms to provide desired output to user.
2.2.1 FEATURES
Virtual assistants typically perform simple jobs for end users, including the following:
12
adding tasks to a calendar;
getting directions;
playing games.
13
The design of the system is essentially a blue print or plan for solution of the system
to be developed. A part of the system or subsystem of a whole system can itself be considered
a system with its own complements
The file design is the last phase that indicates the final system and process of the final
system in the design phase of A.I ASSISTANT, input screen design and output design etc are
designed
All the input screens in this system are user-friendly and understandable format.
Icons designed in this system are brief, compact and self-explanatory the icons are
sharp and the user can invoke the system. Reports generated here give the minute
information, which helps the manager to take vital decisions.
The importance of software design can be stated with a single word "QUALITY":
Design is a place where quality is fostered in software development. Design is the only way
where their requirements are accurately translated into finished software product or system.
The system takes input from the users, processes it and produces an output. Input
design is link that ties the information system into the world of its users. The system should
be users friendly to gain appropriate information to the user
14
Output design generally refers to the results and information that are
integrated by the system for many end users. Output is the main reason for developing the
system and the basis on which they evaluate the usefulness of the application.
External outputs are those whose destination will be outside the organization
Interactive outputs are those, in which user uses in communicating directly with computer
The term database design can be used to describe many different parts of the design of
an overall database system. Principally and most correctly, it can be thought of as the logical
design of the base data structures used to store the data. In the relational model these are the
tables and views. In an object database the entities and relationships map directly to object
classes and named relationships. However, the term database design could also be used to
apply to the overall process of designing, not just the base data structures, but also the forms
and queries used as part of the overall database application within the database management
system (DBMS)
The process of doing database design generally consists of a number of steps which
will be carried out by the database designer.
15
3.5 SYSTEM DEVELOPMENT
A system development project encompasses all the activities undertaken from the
time at which a potential requirement is identified until the resulting system is fully
implemented and accepted by the end user. The process can involve many stages over a long
period. The following section highlights some fundamental issues to be considered. outlines
the main stages in development and procuring new systems, and indicates when and how the
auditor should be involved.
An information system acquired today must not only satisfy present business needs, it
must also be flexible and capable of being enhanced to meet changing circumstances well
into the future. Thus, a pre-requisite to the introduction of a new system is for management to
identify and understand their organization's mission and its related information needs.
Writing this down helps to ensure common understanding and direction, and provides a
yardstick against which achievement can be measured.
The system uses Google’s online speech recognition system for converting speech
input to text. The speech input Users can obtain texts from the special corpora organized on
the computer network server at the information centre from the microphone is temporarily
stored in the system which is then sent to Google cloud for speech recognition. The
equivalent text is then received and fed to the central processor.
API calls
16
Content Extraction
Text-to-speech module
Text-to-Speech (TTS) refers to the ability of computers to read text aloud. A TTS
Engine converts written text to a phonemic representation, then converts the phonemic
representation to waveforms that can be output as sound. TTS engines with different
languages, dialects and specialized vocabularies are available through third-party publishers.
SYSTEM TESTING
Artificial intelligence (AI) has blessed several industries with its efficiency and
accuracy. Businesses are leveraging AI to deliver flawless customer experience at a fraction
of the costs that they used to spend before. Virtual assistants (VA) are helping businesses to
automate customer support and engagement round the clock without any human intervention.
AI-powered solutions have become increasingly popular among both startups and global
enterprises to interact with customers at scale.
17
Key metrics to test virtual assistants
It is essential to keep in mind the below mentioned key metrics when testing virtual
assistants:
1. Response time:
Normally, AI-enabled virtual assistants are expected to reply instantly after an input is
received from the user. Any lag in response can affect the user experience. Hence, it is
business-critical to test the exact response time of the VA to ensure a customer delight
experience.
2. Answering/Response accuracy:
Test the responses or answers by VAs to inputs or queries to ensure they are meeting
the business objective efficiently.
3. Error management:
4. Personality:
Virtual assistants should have a unique tone that is pleasant for users. To ensure a
great customer experience, its tone should be tested and rectified if needed.
5. Navigation:
Customers often feel lost while communicating with a virtual assistant. Make sure the
navigation of the VA is user-friendly for an seamless experience.
18
5.CONCLUSION
In this paper “Virtual Assistant Using Python” we discussed the design and implementation
of Digital Assistance. The project is built using open-source software modules with PyCharm
community backing which can accommodate any updates shortly. The modular nature of this
project makes it more flexible and easier to add additional features without disturbing current
system functionalities.
It not only works on human commands but also give responses to the user based on the query
being asked or the words spoken by the user such as opening tasks and operations. It is
greeting the user the way the user feels more comfortable and feels free to interact with the
voice assistant. The application should also eliminate any kind of unnecessary manual work
required in the user life of performing every task. The entire system works on the verbal input
rather than the next one.
19
BIBLIOGRAPHY
Books References
1. Adriana Stan Beata Lorincz,” GENERATING THE VOICE OF THE INTERACTIVE
VIRTUAL ASSISTANT”, Feb 10th 2021
2. Ali soofastaei,” VIRTUAL ASSISTANT”, Artificial Intelligence Center, Australia,2021
WEBSITES
1. http://www.github.com/
2. http://www.projectworld.com/
3. http://www.greeks for greeks.com/
20
APPENDICES
LEVEL 0
LEVEL 1
21
B) SAMPLE CODING
import subprocess
import wolframalpha
import pyttsx3
import json
import speech_recognition as sr
import datetime
import wikipedia
import webbrowser
import os
import winshell
import pyjokes
import smtplib
import ctypes
import time
import requests
import shutil
22
from twilio.rest import Client
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)
def speak(audio):
engine.say(audio)
engine.runAndWait()
def wishMe():
hour = int(datetime.datetime.now().hour)
23
if hour >= 0 and hour < 12:
else:
assname = ("pixie")
speak(assname)
def username():
uname = takeCommand()
speak("Welcome ")
24
speak(uname)
columns = shutil.get_terminal_size().columns
print("#####################".center(columns))
print("Mr.", uname.center(columns))
print("#####################".center(columns))
def takeCommand():
r = sr.Recognizer()
print("Listening...")
r.pause_threshold = 1
audio = r.listen(source)
25
try:
print("Recognizing...")
except Exception as e:
print(e)
return "None"
return query
server.ehlo()
server.starttls()
26
# Enable low security in gmail
server.close()
if __name__ == '__main__':
clear()
wishMe()
username()
while True:
27
query = takeCommand().lower()
# recognition of command
if 'wikipedia' in query:
speak('Searching Wikipedia...')
speak("According to Wikipedia")
print(results)
speak(results)
webbrowser.open("youtube.com")
28
elif 'open google' in query:
webbrowser.open("google.com")
webbrowser.open("stackoverflow.com")
# music_dir = "G:\\Song"
music_dir = "C:\\Users\\GAURAV\\Music"
songs = os.listdir(music_dir)
print(songs)
codePath = r"C:\\Users\\GAURAV\\AppData\\Local\\Programs\\Opera\\launcher.exe"
os.startfile(codePath)
try:
content = takeCommand()
sendEmail(to, content)
except Exception as e:
print(e)
content = takeCommand()
to = input()
sendEmail(to, content)
except Exception as e:
print(e)
31
elif "change my name to" in query:
assname = query
assname = takeCommand()
speak(assname)
exit()
32
elif "who made you" in query or "who created you" in query:
speak(pyjokes.get_joke())
speak(pyjokes.get_joke())
client = wolframalpha.Client(app_id)
indx = query.lower().split().index('calculate')
answer = next(res.results).text
webbrowser.open(query)
speak("Then why did even ask that question , are you dumb or what?.")
os.startfile(power)
speak("It is 7th sense that destroy all other senses and i hope master dont get fool by
love")
ctypes.windll.user32.SystemParametersInfoW(20,
0,
35
"Location of wallpaper",
0)
appli = r"C:\\ProgramData\\BlueStacks\\Client\\Bluestacks.exe"
os.startfile(appli)
try:
jsonObj = urlopen(
data = json.load(jsonObj)
i=1
36
print('''=============== TIMES OF INDIA ============''' + '\n')
print(item['description'] + '\n')
i += 1
except Exception as e:
print(str(e))
ctypes.windll.user32.LockWorkStation()
speak("for how much time you want to stop jarvis from listening commands")
a = int(takeCommand())
time.sleep(a)
print(a)
location = query
speak(location)
subprocess.call(["shutdown", "/r"])
speak("Hibernating")
subprocess.call("shutdown / h")
time.sleep(5)
subprocess.call(["shutdown", "/l"])
snfm = takeCommand()
file.write(strTime)
file.write(" :- ")
file.write(note)
else:
file.write(note)
speak("Showing Notes")
print(file.read())
speak(file.read(6))
40
elif "update assistant" in query:
speak("After downloading file please replace this file with the downloaded one")
r = requests.get(url, stream=True)
total_length = int(r.headers.get('content-length'))
for ch in progress.bar(r.iter_content(chunk_size=2391975),
if ch:
Pypdf.write(ch)
# NPPR9-FWDCX-D2C8J-H872K-2YT43
wishMe()
41
speak("pixie 1 point o in your service Mister")
speak(assname)
city_name = takeCommand()
response = requests.get(complete_url)
x = response.json()
if x["code"] != "404":
y = x["main"]
42
current_temperature = y["temp"]
current_pressure = y["pressure"]
current_humidiy = y["humidity"]
z = x["weather"]
weather_description = z[0]["description"]
else:
.create(
body=takeCommand(),
from_='Sender No',
to='Receiver No'
print(message.sid)
webbrowser.open("wikipedia.com")
speak(assname)
44
# most asked question from google Assistant
speak("no i m fine, just ask a real girl dude and stop simping at an a i")
client = wolframalpha.Client("API_ID")
res = client.query(query)
try:
45
print(next(res.results).text)
speak(next(res.results).text)
except StopIteration:
print("No results")
# Command go here
C) SAMPLE INPUT
46
47
48
49
D) SAMPLE OUTPUT
50
51