ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Text to speech voices

asked 2011-08-06 14:46:52 -0500

ringo42 gravatar image

updated 2014-01-28 17:10:10 -0500

ngrennan gravatar image

I see this has been asked in the past but I have not seen an answer that works. Text to speech uses a very slow hard to understand voice. I followed http://ubuntuforums.org/showthread.ph... and installed the enhanced Nitech HTS voices. I ran festival from the command line and can hear the new voices. i tried editing the festival usr/share/festival/festival.scm file and added (set! voice_default 'voice_nitech_us_rms_arctic_hts) but when I do that and then try to get it to speak form my python program I get no speech out whatsoever. If I comment out that line my python program works just with the nasty voice. I also added the festival.scm file to /etc (there was not one there) like mentioned in another answer but when I do that again my sound disappears. I also tried modifying voices.scm and changing KAL to don but that still does not help. I think I have tried everything mentioned here. Has anyone figured out how to fix this? I'm using diamondback on ubunto 10.10.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-08-08 07:16:20 -0500

Pi Robot gravatar image

updated 2011-08-08 07:17:04 -0500

Hi Ringo,

I have a possible solution for you below but first here is a summary of what I tried. I am using Ubuntu 10.04 with the festival debian packages obtained using the Synaptics package manager.

First I tried your scenario with the latest Diamondback debian packages and confirmed that I also get the slow low voice. (I reported this a while back as a bug.)

Next I tried it with the latest Electric beta debian packages and in this case, launching the sound_play node fails with the following error:

process[soundplay_node-2]: started with pid [5505]
Traceback (most recent call last):
  File "/opt/ros/electric/stacks/audio_common/sound_play/scripts/soundplay_node.py", line 49, in <module>
    from diagnostic_msgs.msg import DiagnosticStatus, KeyValue, DiagnosticArray
ImportError: No module named diagnostic_msgs.msg
[soundplay_node-2] process has died [pid 5505, exit code 1].
log files: /home/patrick/.ros/log/d13001dc-c1ef-11e0-9414-0022683b2a0b/soundplay_node-2*.log

The fix I have found that works with both Diamondback and Electric is to overlay the latest audio_common stack as follows:

$ cd /home/ringo/ros (or whatever your personal ROS directory is)
$ sudo apt-get install mercurial
$ hg clone `roslocate uri audio_common`
$ rosmake --rosdep-install audio_common

Then run:

$ rospack profile

in each of your terminal windows and try this test:

In the first terminal:

$ roslaunch sound_play soundplay_node.launch

and in the second terminal:

$ rosrun sound_play say.py "How do I sound now?"

IMPORTANT: In your Python program, you need to add a second argument to the SoundClient say() command. So this:

self.soundhandle = SoundClient()
rospy.sleep(1)
self.soundhandle.say('Take me to your leader.')

becomes this:

self.soundhandle = SoundClient()
rospy.sleep(1)
self.soundhandle.say('Take me to your leader.', '')

The second argument is for specifying the voice, but I have only tried setting it to the null string.

Hope that works for you!

--patrick

edit flag offensive delete link more

Comments

Running Ubuntu 11.04 with the latest audio_common stack, I had the same problem as described above. I applied the last part of the solution (Set the voice to the null string, or "" in C++) and this works for me.
Per Lenander gravatar image Per Lenander  ( 2011-11-24 05:47:19 -0500 )edit

Question Tools

Stats

Asked: 2011-08-06 14:46:52 -0500

Seen: 1,837 times

Last updated: Aug 08 '11