File size: 579 Bytes
baa1558
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
class CaesarAPIs:
    def __init__(self) -> None:
        self.whisper_mode = 0
    def runapis(self,caesarResponse=None,intent=None,userinput=None,voiceengine=None):
        if intent == "whisper_mode" and "on" in userinput:
            self.whisper_mode = 1
            voiceengine.say("I will be quiet now sir")
            voiceengine.runAndWait()
        elif intent == "whisper_mode" and "off" in userinput:
            self.whisper_mode = 0
            voiceengine.say("Can you hear me now sir")
            voiceengine.runAndWait()