/
jarvis.py
45 lines (33 loc) · 1.03 KB
/
jarvis.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from Brain.AIBrain import ReplyBrain
from Body.Listen import MicExecution
print(">> Starting The Jarvis : Wait For Some Seconds.")
from Body.Speak import Speak
from Features.Clap import Tester
print(">> Started The Jarvis : Wait For Few Seconds More")
from Main import MainTaskExecution
def MainExecution():
Speak("Hello Sir")
Speak("I'm Jarvis, I'm Ready To Assist You Sir.")
while True:
Data = MicExecution()
Data = str(Data).replace(".","")
ValueReturn = MainTaskExecution(Data)
if ValueReturn==True:
pass
elif len(Data)<3:
pass
elif "whatsapp message" in Data:
pass
elif "turn on the tv" in Data:# Specific COmmand
Speak("Ok..Turning On The Android TV")
else:
Reply = ReplyBrain(Data)
Speak(Reply)
def ClapDetect():
query = Tester()
if "True-Mic" in query:
print("")
MainExecution()
else:
pass
ClapDetect()