Hi! I’m looking to do some work with the stretch-robot speaker by using the ReSpeaker Python Library. However, this is my first time working with robots so I’m not sure how start. Is there any starter code I can look at that can show me how I can set up the speaker functionality and do basic things such as play sound or record audio?
Hi @Robot_Lover, I’m glad you’re interested in working with Stretch’s Respeaker. We have example code demonstrating how to work with the Respeaker available on Github here. The command line tool showcases three basic Respeaker functions: recording 3 seconds of audio when voice activity is detected, and playing it back. We ship this tool by default with your robot, so you can try it out easily by opening a terminal and running:
Let me know if you have any questions on the code. Hope this helps!
We tested the speaker. It appears the program executes but no sound is played from the speaker. Here is the terminal output
Apologies for the delay in reply, @bshah is out of the office right now. Can you confirm that your audio is working in general? Check that the volume knob is up, the Headphones are set as the default audio out, and that the Test Speakers generates the test sounds.
Update - the file works, it seems like something with our own ROS node conflicted with the test file