class SoundRosWrapper(object):
Constructor: SoundRosWrapper(hardware_version, service_timeout)
Undocumented
Method | __init__ |
Undocumented |
Method | delete |
Delete a sound on the RaspberryPi of the robot. If failed, raise NiryoRosWrapperException |
Method | get |
Returns the duration in seconds of a sound stored in the robot database raise SoundRosWrapperException if the sound doesn't exists |
Method | import |
Delete a sound on the RaspberryPi of the robot. If failed, raise NiryoRosWrapperException |
Method | play |
Play a sound from the robot If failed, raise NiryoRosWrapperException |
Method | say |
Use gtts (Google Text To Speech) to interpret a string as sound Languages available are: - English: 0 - French: 1 - Spanish: 2 - Mandarin: 3 - Portuguese: 4 |
Method | set |
Set the volume percentage of the robot. If failed, raise NiryoRosWrapperException |
Method | stop |
Stop a sound being played. If failed, raise NiryoRosWrapperException |
Property | hardware |
Undocumented |
Property | sounds |
Get sound name list |
Static Method | __check |
Undocumented |
Method | __call |
Wait for the service called service_name Then call the service with args |
Method | __check |
Undocumented |
Method | __classic |
Undocumented |
Method | __sound |
Undocumented |
Instance Variable | __hardware |
Undocumented |
Instance Variable | __service |
Undocumented |
Instance Variable | __sound |
Undocumented |
Instance Variable | __sounds |
Undocumented |
Delete a sound on the RaspberryPi of the robot. If failed, raise NiryoRosWrapperException
Parameters | |
sound | name of the sound which needs to be deleted |
Returns | |
(int, str) | status, message |
Returns the duration in seconds of a sound stored in the robot database raise SoundRosWrapperException if the sound doesn't exists
Parameters | |
sound | name of sound |
Returns | |
float | sound duration in seconds |
Delete a sound on the RaspberryPi of the robot. If failed, raise NiryoRosWrapperException
Parameters | |
sound | name of the sound which needs to be deleted |
sound | String containing the encoded data of the sound file (wav or mp3) |
Returns | |
(int, str) | status, message |
Play a sound from the robot If failed, raise NiryoRosWrapperException
Parameters | |
sound | Name of the sound to play |
wait | wait for the end of the sound before exiting the function |
start | start the sound from this value in seconds |
end | end the sound at this value in seconds |
Returns | |
(int, str) | status, message |
Use gtts (Google Text To Speech) to interpret a string as sound Languages available are: - English: 0 - French: 1 - Spanish: 2 - Mandarin: 3 - Portuguese: 4
Parameters | |
text:string | text to speek < 100 char |
language:int | language of the text |
Returns | |
(int, str) | status, message |
Set the volume percentage of the robot. If failed, raise NiryoRosWrapperException
Parameters | |
sound | volume percentage of the sound (0: no sound, 100: max sound) |
Returns | |
(int, str) | status, message |
Stop a sound being played. If failed, raise NiryoRosWrapperException
Returns | |
(int, str) | status, message |