-
Notifications
You must be signed in to change notification settings - Fork 0
/
JarvisMain.py
46 lines (32 loc) · 1.11 KB
/
JarvisMain.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
46
from Brain.AIBrain import ReplyBrain
from Brain.Qna import QuestionAnswer
from Body.Listen import MicExecution
print("\n>> Starting the Jarvis : Wait For Some Seconds.")
from Body.Speak import Speak
from Features.Clap import Tester
from Main import MainTaskExe
print(">> Starting the Jarvis : Wait For Few More Seconds, Please.")
def MainExe():
Speak("Hello Sir")
Speak("I am Jarvis, I'm ready to assist you.")
while True:
Data = MicExecution()
Data = str(Data).replace(".","")
if len(Data)<3:
pass
elif "stop" in Data:
break
elif MainTaskExe(Data):
pass
else:
Reply = ReplyBrain(Data)
Speak(Reply)
def ClapDetect():
query = Tester()
if "True-Mic" in query:
MainExe()
# calling clapdetect function to execute MainExe
ClapDetect()
# elif "calculate" in Data or "answer" in Data or "solve" in Data or "solution" in Data or "question" in Data:
# Reply1 = QuestionAnswer(Data)
# Speak(Reply1)