A demo that has a robot wave whenever someone says “hello” and prints the detected transcript on the laptop.
...
View file |
---|
name | Invalid file id - UNKNOWN_MEDIA_ID |
---|
|
WARNING: this pseudeocode, use only as a reference of how to set up a structure to the image above
Code Block |
---|
|
pepper = Pepper(device_id="pepper1")
dialogflow = self.connect(DialogflowService, device_id='local')
dialogflow.register_input(pepper.microphone)
dialogflow.register_callback(print_transcript)
while True:
intent = dialogflow.request(ListenForIntentRequest())
if intent.name == "hello":
wave_req = PepperMotionRequest("wave")
pepper.motion.request(wave_req) |