-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGymTrainerBot.py
32 lines (27 loc) · 1.01 KB
/
GymTrainerBot.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
from TextToSpeech import *
from GlobalHelpers import *
from AzureHelpers import *
def startBotGreeting():
greet = getRandomBotAnswers(botAnswers["greeting"])
BotSpeak(greet)
return greet
def humanIntroduction():
intent,responseIntentJson = AzureContinuousIntentFetching()
intrGreet = mapIntent(intent,responseIntentJson,"Introduction")
BotSpeak(intrGreet)
return intrGreet
def askExercise():
intent,responseIntentJson = AzureContinuousIntentFetching()
execGreet = mapIntent(intent,responseIntentJson,"ExerciseSentiment")
BotSpeak(execGreet)
return execGreet
def startBot():
# Greet Stage
BotSpeak(getRandomBotAnswers(botAnswers["greeting"]))
# Name Stage
intent,responseIntentJson = AzureContinuousIntentFetching()
mapIntent(intent,responseIntentJson,"Introduction")
# Exercise Stage
intent,responseIntentJson = AzureContinuousIntentFetching()
mapIntent(intent,responseIntentJson,"ExerciseSentiment")
# startBot()