Я хотел бы создать простую программу с целью заставить Pepper сообщать мне время или дату сейчас, когда он распознает мою речь, в моем случае - «Дата» или «Время». Могу ли я узнать, как мне написать код в моем скрипте Python для TTS?
Ниже приведен код моего блока Python для TTS:
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
Спасибо всем за помощь. Я здесь новичок.