Acquire sentences over a yarp port and then let the robot utter them, also controlling the facial expressions.
Acquire sentences over a yarp port and then let the robot utter them, also controlling the facial expressions.
Description
The behavior is pretty intuitive and does not need any further detail.
Libraries
- YARP libraries.
- Packages for speech synthesis (e.g. speech-dev, festival, espeak, ...).
Parameters
–name name
- The parameter name identifies the unique stem-name used to open all relevant ports.
–period T
- The period given in [ms] for controlling the mouth.
–equalize_time time
- The time given in [s] for equalizing the start of facial expressions control with the start of speech synthesis. Default value is 0.0 [s].
–package pck
- The parameter pck specifies the package used for utterance; e.g. "speech-dev", "festival", "acapela-tts", "espeak", ...
If speech-dev is specified then the yarp speech device is employed.
–package_options opt
- The parameter opt is a string specifying further command-line options to be used with the chosen package. Refer to the package documentation for the available options. In case the speech-dev package is used, this option should contain property-like rpc commands.
Ports Created
- / <name>: this port receives the string for speech synthesis. In case a double is received in place of a string, then the mouth will be controlled without actually uttering any word; that double accounts for the uttering time.
Optionally, as second parameter available in both modalities, an integer can be provided that overrides the default period used to control the mouth, expressed in [ms]. Negative values are not processed and serve as placeholders.
Finally, available only in string mode, a third double can be provided that establishes the uttering duration in seconds, irrespective of the words actually spoken.
- / <name>/emotions:o: this port serves to command the facial expressions of the iCub.
- / <name>/r1:rpc: this port serves to command the R1's mouth.
- / <name>/rpc: a remote procedure call port used for the following run-time querie:
- [stat]: returns "speaking" or "quiet".
- [set] [opt] "package_options": set new package dependent command-line options.
- [get] [opt]: returns a string containing the current package dependent command-line options.
- / <name>/speech-dev/rpc: this port serves to talk to speech yarp device.
Tested OS
Linux and Windows.
- Author
- Ugo Pattacini