#1 JARVIS
What is Jarvis?
Just A Rather Very Intelligent System (J.A.R.V.I.S.) is an virtual artificial intelligence made by
Tony Stark. J.A.R.V.I.S. do mostly all the work for Tony Stark(Iron
man). It running business for Stark Industries as well as security for Tony
Stark's Mansion and Stark Tower.
After creating Mark II armor, Stark upload J.A.R.V.I.S.
into all the Iron man armors, as well as allowing him to interact with with
other Avengers, giving them information during combat.
What is AI?
Artificial Intelligence (AI), is a branch of Computer Science
which deals with the ability of the Computer or a Robot controlled by a
computer to do tasks that are usually done by humans because it need human
intelligence.
Types
- Reactive Machine
- Limited Memory
- Theory of Mind
- Self-Awareness
Our J.A.R.V.I.S.
Our Jarvis is a 1st type of AI which is Reactive
Machine. The most basic types of AI systems are purely reactive, and have the ability
neither to form memories nor to use past experiences to inform current
decisions.
Ok I hope theory class is enough for you Lets Code our J.A.R.V.I.S.
First you have to install some Python packages. For that open terminal and run
the command one by one given below
Terminal
pip install pyttsx3
pip install SpeechRecognition
Python code
import pyttsx3
import speech_recognition as sr
engine = pyttsx3.init('sapi5')
voices= engine.getProperty('voices')
print(voices[0].id)
engine.setProperty('voices', voices[0].id)
def speak(audio):
engine.say(audio)
engine.runAndWait()
def takecommand():
r=sr.Recognizer()
with sr.Microphone() as source:
print("Listening...")
r.pause_threshold=1
audio = r.listen(source, timeout=1,
phrase_time_limit=5)
try:
print("Recognizing..")
query=r.recognize_google(audio, language=
'en-in')
print(query)
except:
speak("Say that again Please")
return query
if __name__=="__main__":
speak("Hi, I am Jarvis")
takecommand()
No comments:
Post a Comment