sound_play noise/lock up with text to speech

asked 2017-04-28 19:04:04 -0600

burtbick gravatar image

Things work well for a while with text to speech but then I start getting some static noise in the voice output and after a while sound_play appears to lock up, and I have to kill it from another console, control-C doesn't work in this case.

Has anyone else seen this problem before? Running Linux Mint 17.1 (Ubuntu 14.04) and Indigo ROS.

Also, sometimes when I kill my Python test script I sometimes get this warning in the sound_play output:

[WARN] [WallTime: 1493422525.020843] Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details.

I was looking for some way to cleanly break the connection between my Python script and sound_play when I kill my script but I haven't found one yet.

==== End of question(s) ======

Some additional information, but not critical to the question.

I've been experimenting with speech recognition and synthesis, and generally working quite well. I'm able to give voice commands and have my robot head perform actions and report status using sound_play.

I'm using a SimpleActionClient to access sound_play and wait for the result which seems to track well with how long it takes test to speech to complete. I just had to work out a mechanism to prevent Sphinx from responding to the robot's speech output.

edit retag flag offensive close merge delete


We need more background info to be able to help you. What text-to-speech package are you running? Can you post a link? If you want to break the script, you can get the process id using ps ax | grep <name of script> and then kill it using kill -9 <PID>

lakehanne gravatar image lakehanne  ( 2017-04-29 22:52:59 -0600 )edit

Sorry, forgot to mention that I'm using Festival for TTS, via sound_play.. I know I can kill the sound_play node, but was wondering if there was a different way to "disconnect" from my test speech script when it exits?

burtbick gravatar image burtbick  ( 2017-04-30 11:23:04 -0600 )edit

You can test for shutdown using rospy.is_shutdown()method. The documentation reference is here.

lakehanne gravatar image lakehanne  ( 2017-04-30 14:10:47 -0600 )edit