0

I want to show slideshow and pepper would read on it.

u: (say) I am pepper $slide=1 I can do this and that $slide=2 i have many functions $slide3=1 like this and that

And i want to cancel it when i hold Pepper head sensor for 1 second.

How is this possible? I will show slideshow and i want user to be able to stop it in the middle of if user touches robot's head.

1 Answers1

2

You can do two things :

  1. Stop the say of ALTextToSpeech : you can cancel the function ALTextToSpeech.say("phrase") with ALTextToSpeech.stopAll() . ALTextToSpeech doc

  2. Stop by deactivate your topic : your pepper say a topic dialog and you can stop it by deactivating the topic with ALDialog.deactivateTopic("name_topic"). ALDialog doc

for example, your topic is like this :

topic: ~ExampleDialog() language: enu u: (say) I am pepper $slide=1 I can do this and that $slide=2 i have many functions $slide3=1 like this and that

When the user touches the robot's head, you call the function ALDialog.deactivateTopic(ExampleDialog) and that cancels it.

mcaniot
  • 405
  • 3
  • 9