In this tutorial, we will explain about different kinds of things we can do with Pepper's voice recognition/output functionalities.
Sensors & Output specifications
Listed below are the sound related sensors and output devices embedded in Pepper
In this tutorial, we will explain how to make an application that makes the sound "Meow" when users touch Pepper’s head.
The supported sound files are those in .wav format and .ogg format for the virtual robot, as well as .mp3 format for Pepper.
Please prepare the appropriate sound file before starting this tutorial.
1. Prepare boxes
2. Connect boxes
Connect the second output (frontTouched) of the “Tactile Head” box to the onStart input of “Play Sound” box. This makes Pepper respond to the tactile stimulus on the forehead.
There are three different touch sensors on Pepper’s head (front [A], centre [B], back [C]), and each sensor has its corresponding output on “Tactile Head” box. This allows Pepper to perform different behaviours depending on which part of the head is touched.
3. Import the sound file
Sound and/or video files that are referenced by certain boxes must be imported into the project beforehand.
On the [Project files] pane, click on the + button and select [Import files…], then open the sound file.
4. Set the imported sound file on Play Sound box parameter.
Open the parameter dialog box of Play Sound, and click on the Open file icon of file name variable.
Select the imported sound file and click [OK].
The path to the sound file is not set on the File name parameter.
Test the operation
Connect Choregraphe to Pepper and run the application. Try touching the front of Pepper's head and see if the sound file plays.
Track the sound source
In the Box libraries, there are boxes that are categorised as “Trackers”, which allows Pepper to track the stimulation source.
In this tutorial, we will make Pepper turn to the source of sound using microphones.
1. Prepare boxes.
2. Connect the flow.
We are only using a single box in this tutorial.
3. Set the parameters.
Make sure that the Mode variable is set to “Head”.
Test the operation
Connect Choregraphe to Pepper and run the application. Try clapping your hands around Pepper's head and see if Pepper turns to the source of sound.