Я хотел бы создать простую программу с целью получить, чтобы Пеппер сообщал мне время или дату, когда он распознает мою речь, либо «Дата», либо «Время» в моем случае. Могу ли я узнать, как мне писать код в моем скрипте TTS Python?
Ниже приведен код на моем окне TTS Python:
class MyClass(GeneratedClass):
def __init__(self):
GeneratedClass.__init__(self)
def onLoad(self):
#put initialization code here
from naoqi import ALProxy
self.tts = ALProxy("ALTextToSpeech")
pass
def onUnload(self):
#put clean-up code here
pass
def onInput_onStart(self):
#self.onStopped() #activate the output of the box
self.tts.say("Today is **#here i want to get input from GET DATE box#** ")
self.onStopped()
pass
def onInput_onStop(self):
self.onUnload() #it is recommended to reuse the clean-up as the box is stopped
self.onStopped() #activate the output of the box
Печать экрана моей программы Choregraphe
Спасибо всем за помощь. Я новичок здесь.