Professional Documents
Culture Documents
A.I Assistant: Nandha Arts and Science College
A.I Assistant: Nandha Arts and Science College
A.I Assistant: Nandha Arts and Science College
I ASSISTANT
A Project work submitted in partial fulfillment of the requirements for the award of the degree of
BACHELOR OF COMPUTER APPLICATIONS of BHARATHIAR UNIVERSITY, Coimbatore-46.
Submitted by
BITTU VERMA B
MARCH - 2023
ERODE - 52
1
NANDHA ARTS AND SCIENCE COLLEGE
(Affiliated to Bharathiar University, Accredited by NAAC with ‘B+’ Grade)
ERODE - 52.
CERTIFICATE
A.I ASSISTANT
BITTU VERMA B
2
Santhila DataBot Private Limited,
DATE:
During this period his conduct and character was found to be good.
3
DECLARATION
I hereby declare that this project entitled “A.I ASSIATANT” submitted to the
BHARATHIAR UNIVERSITY, in partial fulfillment of the requirements for the award of the
Nandha Arts and Science College, Erode, and that it has not formed the basis for award of
any Degree / Diploma / Associate ship / Fellowship or similar title to any candidate of any
University.
4
ACKNOWLEDGEMENT
I also record immense thanks to Dr. S. MANOHARAN, M.A., M.A., M. Phil., Ph.D.,
Principal, Nandha Arts and Science College, Erode, for the valuable advice and suggestion he
gave us to accomplish this task successfully.
I would like to express my heartful thanks to all the faculty members of the
Department of Computer Applications, Nandha Arts and Science College, Erode, who have
helped me directly or indirectly for successful completion of this project work.
5
ABSTRACT
The A.I. a personal voice assistant that used to take the user commands as input and
perform tasks based on the user commands.
It provides more efficient and natural interaction with support of voice commands in
the same utterance. This assistant has a unique speech recognition technique through which
only the authorized user can provide the command to the assistant and can perform their
various tasks on system.
A.I Assistant might perform include scheduling appointments, making phone calls,
making travel arrangements, and managing email accounts. Some A.I assistants specialize in
offering graphic design, blog writing, bookkeeping, social media, and marketing services .
The Methodology of A.I is speech recognition module, API calls, Content Extraction,
Text to speech module.
6
CONTENTS
INTRODUCTION 7
1.1 ORGANIZATION PROFILE 4
1.2 SYSTEM SPECIFICATION 5
I 1.2.1 HARDWARE CONFIGURATION 5
1.2.2 SOFTWARE SPECIFICATION 5
1.3 SOFTWARE DESCRIPTION 6
SYSTEM STUDY 11
2.1 EXISTING SYSTEM 11
2.1.1 DRAWBACKS OF EXISTING SYSTEM 10
II 2.2 PROPOSED SYSTEM 11
2.2.1 FEATURES OF PROPOSED SYSTEM 11
1.INTRODUCTION
7
Today the development of artificial intelligence (AI) systems that can organize a
natural human-machine interaction such as voice, communication, gestures, facial
expressions, and more are gaining in popularity. One of the most studied and popular was the
direction of interaction, based on the understanding of the machine language. It is no longer a
human who learns to communicate with a machine, but a machine learns to communicate
with a human, exploring his actions, habits, behaviour and trying to become his personalized
assistant.
A.I assistants are software programs that help us ease our day-to-day tasks, such as
showing weather reports, creating remainders, making shopping lists etc. They can take
commands via text (online chatbots) or by voice. Voice-based intelligent assistants need an
invoking word or wake word to activate the listener, followed by the command. They are so
many virtual assistants, such as Apple’s Siri, Amazon’s Alexa and Microsoft’s Cortana.
Project was started on the premise that there is a 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.
In the 1990s, digital speech recognition technology became a feature of the personal
computer with IBM, Philips and Lernout & Hauspie fighting for customers. Much later the
market launch of the first smartphone IBM Simon in 1994 laid the foundation for smart
virtual assistants as we know them today.
8
In 2001 Colloquies publicly launched Smarter Child, on platforms like AIM and MSN
Messenger. While entirely text-based Smarter Child was able to play games, check the
weather, look up facts, and converse with users to an extent.
The first modern digital A.I assistant installed on a smartphone was Siri, which was
introduced as a feature of the iPhone 4S on 4 October 2011. Apple Inc. developed Siri
following the 2010 acquisition of Siri Inc., a spin-off of SRI International, which is a research
institute financed by DARPA and the United States Department of Defence Its aim was to aid
in tasks such as sending a text message, making phone calls, checking the weather or setting
up an alarm. Over time, it has developed to provide restaurant recommendations, search the
internet, and provide driving directions.
9
1.1 ORGANIZATION PROFILE
It’s engagement models with their clients are flexible, scalable, secure and custom
defined, based on the specific individual needs of our customers. They follow the right
strategy to ensure business transformation and ensuring 100% success for our customer’s
business and in the process ensuring business continuity for us.
10
1.2 SYSTEM SPECIFICATION
PROCESSOR : INTEL
RAM : 8GB
11
1.3 SOFTWARE DESCRIPTION
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.
12
The various python compilers are:
1. Programiz
2. PyDev
3. PyCharm
4. Sublime Text
5. Thonny
6. Visual Studio Code
7. Jupyter Notebook
8. Vim
9. Atom
10. Spyder
11. IDLE
12. Eric
13. GNU/Emacs
PYCHARM
PyCharm IDE is primarily used in web and application development using Python. It
helps programmers develop applications efficiently in less time. Some of the common
benefits of using it are:
Auto-completion of code
Excellent debugging
Project navigation
Database tools
FEATURES OF PYCHARM
Inline Debugger
Inline debugger, all live debugging data are shown directly in the editor, with variable
values integrated into the editor's look-and-feel. Variable values can be viewed in the source
code, right next to their usages.
Multi-process debugging
PyCharm can debug applications that spawn multiple Python processes, such as
Django applications that don't run in --no-reload mode, or applications using many other Web
frameworks that use a similar approach to code auto-reloading.
13
Run in Any Python Environment
You can run any Python file. Just right-click what you need to run and select 'Run <your
script>'.
PyCharm allows easily configure the required Python environment for your project, be it
local, remote interpreter or a virulent.
Built-in Terminal
This is what makes PyCharm a complete Python IDE. No need to leave the IDE as
you develop. Local terminal is available for Windows, Linux and macOS.
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.
14
3. Free and Open-Source
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
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.
15
7. Object-Oriented and Procedure-Oriented
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.
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.
16
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.
17
2. SYSTEM STUDY
The term A.I assistant or virtual assistant, is also commonly used to describe contract
workers who work from home doing administrative tasks typically performed by executive
assistants or secretaries. A.I 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.
18
2.1.1 DRAWBACKS
A.I 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 A.I 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
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,
say’s jokes 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
19
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:
controlling cameras;
listening to music;
Say’s joke;
20
3.SYSTEM DESIGN AND DEVELOPMENT
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.
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
21
3.3 OUTPUT DESIGN
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.
The objective of a system finds its shape in terms of output, Output of a system can
face various forms. The most command are the reports, screen displays, printed forms,
graphical, drawings etc. The basic requirements of output are that, it should be accurate,
timely and of content, medium and layout for its in tented purpose.
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
22
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.
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
23
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
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.
24
4.TESTING AND IMPLEMENTATION
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.
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.
25
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 a seamless experience.
26
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.
27
28
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/
29
APPENDICES
LEVEL 0
Response Machine
Face Recognition readable
format
Voice to text
Action performer
LEVEL 1
User
Weather BRAIN
Voice API
input Google
API
Response
Wiki API
Action completed
30
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
31
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)
else:
32
speak("Good Evening Sir !")
assname = ("pixie")
speak(assname)
def username():
uname = takeCommand()
speak("Welcome ")
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...")
33
r.pause_threshold = 1
audio = r.listen(source)
try:
print("Recognizing...")
except Exception as e:
print(e)
return "None"
return query
server.ehlo()
server.starttls()
if __name__ == '__main__':
clear()
wishMe()
username()
while True:
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")
webbrowser.open("google.com")
webbrowser.open("stackoverflow.com")
# music_dir = "G:\\Song"
music_dir = "C:\\Users\\GAURAV\\Music"
36
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)
37
speak("I am not able to send this email")
try:
content = takeCommand()
to = input()
sendEmail(to, content)
except Exception as e:
print(e)
assname = query
assname = takeCommand()
speak(assname)
exit()
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,
41
0,
"Location of wallpaper",
0)
appli = r"C:\\ProgramData\\BlueStacks\\Client\\Bluestacks.exe"
os.startfile(appli)
try:
jsonObj = urlopen(
data = json.load(jsonObj)
i=1
42
print(item['description'] + '\n')
i += 1
except Exception as e:
print(str(e))
ctypes.windll.user32.LockWorkStation()
subprocess.call('shutdown / p /f')
speak("for how much time you want to stop jarvis from listening commands")
a = int(takeCommand())
time.sleep(a)
43
print(a)
location = query
speak(location)
subprocess.call(["shutdown", "/r"])
speak("Hibernating")
subprocess.call("shutdown / h")
time.sleep(5)
subprocess.call(["shutdown", "/l"])
44
elif "write a note" in query:
note = takeCommand()
snfm = takeCommand()
file.write(strTime)
file.write(" :- ")
file.write(note)
else:
file.write(note)
speak("Showing Notes")
print(file.read())
speak(file.read(6))
45
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()
speak(assname)
city_name = takeCommand()
response = requests.get(complete_url)
x = response.json()
if x["code"] != "404":
y = x["main"]
current_temperature = y["temp"]
current_pressure = y["pressure"]
current_humidiy = y["humidity"]
z = x["weather"]
weather_description = z[0]["description"]
else:
message = client.messages \
.create(
body=takeCommand(),
from_='Sender No',
to='Receiver No'
print(message.sid)
webbrowser.open("wikipedia.com")
speak(assname)
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:
print(next(res.results).text)
speak(next(res.results).text)
49
except StopIteration:
print("No results")
# Command go here
50
C) SAMPLE INPUT
51
52
53
D) SAMPLE OUTPUT
54
55