Skip to content

Commit

Permalink
Merge pull request geekcomputers#798 from SteveParadox/patch-1
Browse files Browse the repository at this point in the history
Update JARVIS.py
  • Loading branch information
geekcomputers authored Sep 13, 2020
2 parents 014ea53 + 085a37c commit 9527913
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions JARVIS/JARVIS.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__author__ = 'Mohammed Shokr <[email protected]>'
__author__ = 'Mohammed Shokr <[email protected]>'
__version__ = 'v 0.1'

"""
Expand All @@ -7,29 +7,28 @@
"""

# import modules
from datetime import datetime # datetime module supplies classes for manipulating dates and times
import subprocess # subprocess module allows you to spawn new processes
from datetime import datetime # datetime module supplies classes for manipulating dates and times
import subprocess # subprocess module allows you to spawn new processes

import speech_recognition as sr # speech_recognition Library for performing speech recognition with support for Google Speech Recognition, etc..
import speech_recognition as sr # speech_recognition Library for performing speech recognition with support for Google Speech Recognition, etc..

#pip install pyttsx3 # need to run only once to install the library
# pip install pyttsx3 # need to run only once to install the library

# importing the pyttsx3 library
import pyttsx3

# initialisation
engine = pyttsx3.init()
import pyttsx3

# initialisation
engine = pyttsx3.init()

# obtain audio from the microphone
r = sr.Recognizer()
with sr.Microphone() as source:
engine.say("Say something")
engine.runAndWait()
engine.runAndWait()
audio = r.listen(source)

# recognize speech using Google Speech Recognition
Query = r.recognize_google(audio)
Query = r.recognize_google(audio, language = 'en-IN', show_all = True )
print(Query)


Expand All @@ -53,8 +52,8 @@ def get_app(Q):
subprocess.call(['C:\Program Files\Internet Explorer\iexplore.exe'])
else:
engine.say("Sorry Try Again")
engine.runAndWait()
engine.runAndWait()

return


Expand Down

0 comments on commit 9527913

Please sign in to comment.