ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Though I am not 100% sure, the latency might come from both ROS' sound_play
and also festival
. Even sound_play
assures that it can handle multiple play request simultaneously, I had difficulty that it could cause a problem when trying to handle multiple requests within very short interval (ticket already opened).
One workaround that might be worth trying is to use festival
(or other native player) directly. For example for text2speech, do something like this.
process = subprocess.Popen(['festival', '--tts'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
stdout_value, stderr_value = process.communicate(spokenTxt)
process.wait()
For playing audio file, using mplayer
is an option if you're on Ubuntu
.
2 | No.2 Revision |
Though I am not 100% sure, the latency might come from both ROS' sound_play
and also festival
. Even sound_play
assures that it can handle multiple play request simultaneously, I had difficulty that it could cause a problem when trying to handle multiple requests within very short interval (ticket already opened).
One workaround that might be worth trying is to use festival
(or other native player) directly. For example for text2speech, do something like this.
process = subprocess.Popen(['festival', '--tts'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
stdout_value, stderr_value = process.communicate(spokenTxt)
process.wait()
For playing audio file, using mplayer
is an option if you're on Ubuntu
.. These work for us perfectly (although certain interval b/w each play was necessary to guarantee the proper execution and the sound quality).
3 | No.3 Revision |
Though I am not 100% sure, the latency might come from both ROS' sound_play
and also festival
. Even sound_play
assures that it can handle multiple play request simultaneously, I had difficulty that it could cause caused a problem when trying to handle multiple requests within very short interval (ticket already opened).
One workaround that might be worth trying is to use festival
(or other native player) directly. For example for text2speech, do something like this.
process = subprocess.Popen(['festival', '--tts'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
stdout_value, stderr_value = process.communicate(spokenTxt)
process.wait()
For playing audio file, using mplayer
is an option if you're on Ubuntu
. These work worked out for us perfectly well (although certain interval b/w each play was necessary to guarantee the proper execution and the sound quality).
4 | No.4 Revision |
Though Alhough I am not 100% sure, the latency might come from both ROS' sound_play
and also festival
. Even though sound_play
assures that it can handle multiple play request simultaneously, I had difficulty that caused a problem when trying to handle multiple requests within very short interval (ticket opened).
One workaround worth trying is to use festival
(or other native player) directly. For example for text2speech, do something like this.
process = subprocess.Popen(['festival', '--tts'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
stdout_value, stderr_value = process.communicate(spokenTxt)
process.wait()
For playing audio file, using mplayer
is an option if you're on Ubuntu
. These worked out for us well (although certain interval b/w each play was necessary to guarantee the proper execution and the sound quality).