forked from cse481wi19/cse481wi19
-
Notifications
You must be signed in to change notification settings - Fork 5
Tutorial: Robot sound and speech
MAYA CAKMAK edited this page Mar 3, 2022
·
1 revision
You can use some basic text to speech software on the robot and play sounds. Note: the robot's speaker is not very loud.
sound_play provides an API for playing sounds.
We have provided a wrapper around it in fetch_api/src/fetch_api/sound.py
rosrun sound_play soundplay_node.py
rosrun applications sound_demo.py
Make sure you are running sound_play. In simulation, you will need to run this yourself. On the real robot,
Create the sound object:
import fetch_api
sound = fetch_api.RobotSound()To say something:
sound.say('Hello world')To play a sound:
robot_sound.play_sound('E04.wav')The sounds are stored as WAV files in the fetch_api/sounds directory.
We have included several sounds from the Willow Garage sound library.
Feel free to download the whole set and try other sounds.