Minor Project
Minor Project
202
2022-2025
APRIL 23, 2024
JARVIS
Submitted to
Page | 2
Submitted By
Name Roll No
1.MD INTEKHAB ALAM KHAN 22DPCS002DB
2.ABUL HAYAT 22DPCS003DB
3.HASNAT MUSTAFA 22DPCS004DB
4.MD AMAAN AHMAD 22DPCS007DB
5.MD ANAS FAIYAZ 22DPCS011DB
6.MD IMRAN 22DPCS012DB
Submitted to
Page | 3
DECLARATION
Signature of student
MD INTEKHAB ALAM KHAN___________
ABUL HAYAT_______________
HASNAT MUSTAFA_______________
MDAMAAN AHMAD_________________
MD ANAS FAIYAZ________________
MD IMRAN______________________
Date: - _____________
Page | 4
CERTIFICATE
for the award degree of Diploma in Computer Science and Engineering who
carried out the Major Project work under my supervision.
This report has not been submitted to any other university or institution for the
award of any degree.
( Darbhanga)
Page | 5
ACKNOWLEDGEMENT
At every outset, we express our gratitude to almighty lord for showering his
grace and blessings upon me to complete this Minor Project.
Although our name appears on the cover of this book, many people had
contributed in some or the other form. We could not have done this project
without the assistance or support of each of the following and we thank you all
for the same.
We wish to place on our record our deep sense of gratitude to Dr. Anjaiah
Adepu Principal of MANUU Polytechnic, Darbhanga, for his constant
motivation and valuable help through the Training.
We are very thankful to our Internal Guide DR. ANJIAH ADEPU Principle of
Manuu polytechnic Darbhanga, for co-operation and guidance given by him to
complete the project successfully.
Page | 6
PREFACE
Diploma Engineers are highly competent with their technical skills, but they
lack they practical exposure, managing skills, attitude and interpersonal skills,
when they first step into the industry this is very common phrase within the
industry.
As we know python is an emerging language so it becomes easy to write a script for Voice Assistant
in Python. The instructions for the assistant can be handled as per the requirement of user. Speech
recognition is the process of converting speech into text. This is commonly used in voice assistants
like Alexa, Siri, etc. In Python there is an API called Speech Recognition which allows us to convert
speech into text. It was an interesting task to make my own assistant. It became easier to send
emails without typing any word, Searching on Google without opening the browser, and
performing many other daily tasks like playing music, opening your favorite IDE with the help of a
single voice command. In the current scenario, advancement in technologies are such that
they can perform any task with same effectiveness or can say more effectively than us. By making
this project, I realized there the concept of AI in every field decreasing human effort and saving time.
Page | 7
5.it helps us to work with good manner
LIST OF CONTENT
TOPIC PAGE
INTRODUCTION
CHAPTER 2:-HARDWARE/SOFTWARE
REQUIRMENT
CHAPTER6:-FUTURE PROSPECTIVE
Page | 8
INTRODUCTION
Have you ever wondered how cool it would be to have your own
voice assistant?.Imagine how easier it would be to send emails
without typing a single word, do Wikipedia searches without
opening web browsers, and performing many other daily tasks
like playing music with the help of a single voice command. In this
tutorial, I will teach you how you can make your personal A.I.
assistant using Python.
Page | 9
CHAPTER 1
:- Virtual Assistant and AI
Page | 10
Devices and technology
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." Alight 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.
Page | 11
Virtual assistant capability
Virtual assistant capabilities Virtual assistants typically perform
simple jobs for end users, such as adding tasks to a calendar;
providing information that would normally be searched in a web
browser; or controlling and checking the status of smart home
devices, including lights, cameras and thermostats .Users also task
virtual assistants to make and receive phone calls, create text
messages, get directions, hear news and weather reports, find hotels
or restaurants, check flight reservations, hear music, or play games
NOTE :-
VIRTUAL ASSISTANT IN FUTURE ALSO REPLACE HUMAM
BRAIN AND EVEN DISCOVER MANY UNSOLVED MYSTERY
ARTIFICIAL INTELEGENCE
ARTIFICIAL INTELEGENCE Artificial intelligence (AI) refers to the
simulation of human intelligence in machines that are
programmed to think like humans and mimic their actions. The
term may also be applied to any machine that exhibits traits
Page | 12
associated with a human mind such as learning and problem
solving.
Understanding
standing Artificial Intelligence (AI)
When most people hear the term artificial intelligence, the first
thing they usually think of is robots. That's because bigbig-budget
films and novels weave stories about human-like like machines that
wreak havoc on Earth. But nothing could be further from truth.
Artificial intelligence is based on the principle that human
intelligence can be defined in a way that a machine can easily mimic
Page | 13
it and execute tasks, from the most simple to those that are even
more complex. The goals of artificial intelligence include
mimicking human cognitive activity. Researchers and developers
in the field are making surprisingly rapid strides in mimicking
activities such as learning, reasoning, and perception, to the extent
that these can be concretely defined. Some believe that
innovators may soon be able to develop systems that exceed the
capacity of humans to learn or reason out any subject. But others
remain skeptical because all cognitive activity is laced with value
judgments that are subject to human experience. As technology
advances, previous benchmarks that defined artificial intelligence
become outdated. For example, machines that calculate basic
functions or recognize text through optical character recognition are
no longer considered to embody artificial intelligence, since this
function is now taken for granted as an inherent computer
function.AI is continuously evolving to benefit many different
industries. Machines are wired using a cross-disciplinary approach
based on mathematics, computer science, linguistics, psychology, and
more. Algorithms often play a very important part in the structure of artificial intelligence,
where simple algorithms are used in simple applications, while more complex ones help frame
strong artificial intelligence.
Page | 15
CHAPTER 2 :-
Software and Hardware specification.
Hardware requirements
Processor : Intel i5
RAM : 8 GB
SSD : 512 GB
Software Requirement
IDE :-
VISUAL STUDIO CODE & PyCharm are the most popular IDE for
Python and includes great features such as excellent code
completion and inspection with advanced debugger and support for
web programming and various frameworks. PyCharm is created by
Czech company, Jet brains which focusses on creating integrated
development environment for various web development languages
like JavaScript and PHP. Language: PYTHON 3.11
Library:-
Pyttsx: -
Pyttsx3 stands for Python Text to Speech. It is a cross-platform
Python wrapper for text-to-speech synthesis.
Page | 16
It is a Python package supporting common text-to-speech engines on
Mac OS X. Windows, and Linux. It works for both Python2.x and 3.x
versions. Its main advantage is that it works offline.
Speech Recognition:-
This is a library for performing speech recognition, with support for
several engines and APIs, online and offline
It supports APIs like Google Cloud Speech API, IBM Speech to Text,
Microsoft Bing. Voice Recognition etc.
PyWhatKit: -
is a Python library with various helpful features. It's easy to use and
does not require you to do any additional setup. Currently, it is one of
the most popular libraries for WhatsApp and YouTube automation.
New updates are released frequently with new features and bug
fixes.
Requests:-
library is of an integral parts Python for making HTTP requests to a
specified URL. Whether it be REST APIs or Web Scrapping, requests is
a must be learned for proceeding further with these technologies.
When one makes a request to a URI, it returns a response. Python
requests provide inbuilt functionalities for managing both the
request and response.
Page | 17
Beautiful Soup:-
a Python library for pulling data out of HTML and XML files. It works
with your favorite parser to provide idiomatic ways of navigating,
searching, and modifying the parse tree. It commonly saves
programmers hours or days of work.
Time:-
Python's time module provides a function for getting local time from
the number of seconds elapsed since the epoch called local time().
Notice that tm_isdst=0. Since DST matters with local time, timeis
Page | 18
CHAPTER 3 :-
Page | 19
Microsoft developed speech APL
Helps in synthesis and recognition
of voice.
What Is Voiceld?
Voice id helps us to select different
voices.
1. voice[0].id David voice
2. voice[1].id Zira voice
functions()
speak ()
Wishme()
SEARCH ON WIKIPEDIA( )
Code:
SEARCH ON GOOGLE( )
We are opening Google in a web
web-browser by applying the same logic
that we used to open YouTube.
PLAY MUSIC( )
To play music, we need to import a module called os. Import this
module directly with an import statement.
Page | 22
CURRENT DATE & TIME ( )
In the above, code with using datetime() function and storing the
current or live system into a variable called str Time. After storing the
time in str Time, we are passing this variable as an argument in speak
function. Now, the time string will be converted into speech.
SEND EMAIL( )
What is smtplib?
Page | 23
This instance method allows us to send an email. It tak
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.
DEFINING Server. Send mail ("vouramailingmail.com, to, content)
PYJOKE ( )
TEMPRATURE( )
since you have to purchase weather API for using weather function
.we have used an alternative method we have used request module
to take information from www.google.com and beautifulsoup for
extracting that information and speaking current temorature.
Page | 24
CURRENT LOCATION ON GOOGLE MAP( )
Page | 25
CHAPTER 4
WORKING OF JARVIS
import pyttsx3
import datetime
import speech_recognition as sr
import wikipedia
import webbrowser as wb
import os
import pyautogui
import webbrowser
import pywhatkit
import pyjokes
from playsound import playsound
engine = pyttsx3.init()
def speak(audio):
engine.say(audio)
engine.runAndWait()
def wishme():
hour = datetime.datetime.now().hour
if 4 <= hour < 12:
greet = "Good Morning Sir!!"
elif 12 <= hour < 16:
greet = "Good Afternoon Sir!!"
elif 16 <= hour < 24:
greet = "Good Evening Sir!!"
else:
greet = "Good Night Sir, See You Tomorrow"
def screenshot():
img = pyautogui.screenshot()
user_directory =
os.path.expanduser("~\\Pictures\\ss.png")
img.save(user_directory)
def google_search(query):
search_url = "https://www.google.com/search?q=" +
"+".join(query.split())
wb.open(search_url)
def takecommand():
r = sr.Recognizer()
with sr.Microphone() as source:
print("Listening...")
r.pause_threshold = 1
audio = r.listen(source)
try:
print("Recognizing...")
query = r.recognize_google(audio, language="en-
in")
print(query)
except Exception as e:
print(e)
speak("Please say that again")
return "Try Again"
return query
if __name__ == "__main__":
wishme()
while True:
Page | 27
query = takecommand().lower()
Page | 28
speak("Ok wait sir, I'm searching...")
query = query.replace("wikipedia","")
result = wikipedia.summary(query,
sentences=2)
print(result)
speak(result)
except:
speak("Can't find this page sir, please
ask something else")
Page | 29
remember = open("README.txt", "r")
speak("You told me to remember that" +
remember.read())
print("You told me to remember that " +
str(remember))
else:
speak("I'm sorry, I didn't understand that
command.")
Page | 30
Page | 31