-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtempCodeRunnerFile.py
More file actions
44 lines (31 loc) · 893 Bytes
/
Copy pathtempCodeRunnerFile.py
File metadata and controls
44 lines (31 loc) · 893 Bytes
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
from Brain.qna import QuestionAnswer
from Brain.AiBrain import ReplyBrain
from Body.Listen import MicExecution
print(">> Starting Jarvis : Wait for Some Second...")
from Body.Speak import Speak
from Features.Clap import Tester
print(">> Starting Jarvis : Wait for Some Second...")
Speak("Hlo boss")
def MainExecution():
Speak("Hlo sir ")
Speak("I am Jarvis")
while True:
Data=MicExecution()
Data=str(Data)
if len(Data)<3:
pass
elif "What is " in Data or "where is" in Data or "question" in Data or "answer" in Data:
reply=QuestionAnswer(Data)
Speak(reply)
else:
reply=ReplyBrain(Data)
Speak(reply)
# wakeup
def clapDetect():
query = Tester()
if "True-Mic" in query:
Speak("Detected Owner..")
MainExecution()
else:
pass
clapDetect()