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. This transcript is passed as the message output of the service, while the detected intent is passed as the reply.

...

WARNING: this pseudeocode, use only as a reference of how to set up a structure to the image above

Code Block
languagepy
pepper = Pepper(ip="192.168.0.23")
dialogflow = Dialogflow(ip="localhost")

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

while True:
  intent = dialogflow.request(ListenForIntent())
  if intent.name == "hello":
    pepper.motion.request(PepperMotion("wave"))

...