Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A demo that has a This is example pseudocode for how Dialogflow may be used to have the robot wave whenever someone says “hello” and prints the detected transcript on the laptop.

View file
nameInvalid 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
languagepy
pepper = Pepper(device_idip="pepper1192.168.0.23")
dialogflow = self.start_service(DialogflowService, device_id='local'Dialogflow(ip="localhost")

dialogflow.register_inputconnect(pepper.microphone)
dialogflow.register_callback(print_transcript)

while True:
  intent = dialogflow.request(ListenForIntentRequestListenForIntent())
  if intent.name == "hello":
 
  wave_req = PepperMotionRequest("wave")
    pepper.motion.request(wave_reqPepperMotion("wave"))

...