wolterh
July 27th, 2011, 08:59 AM
Hi, I've been trying to get a robotic voice TTS to replace the default voice in espeak, which is boring and terrible.
I have achieved a female robotic voice, which I explain how to obtain here.
The tools used are
espeak
sox (play)
First, to "say" something with espeak, the TTS engine, you can use the following code:
echo "All systems online" | espeak
The voice the text is read with is the one we want to change. Specifically for the female robotic voice, we are going to use as base voice the female3 voice. We can set espeak to use it with the -v parameter, followed by the name of the voice: e.g.
echo "I sound like a female" | espeak -v female3
Now is when the robotic part comes in. Robotic voices are typically characterized by two things:
Echo
Metallic sound
These effects we can achieve with the sound manipulation application play, which is an interface to sox used solely for playing audio.
You can read the manual on sox
man sox to understand the following code, which will transform normal computer voice into robotic-ish voice. You should read the espeak manual as well.
OBTAINING THE ROBOTIC VOICE
To get the robotic voice, follow these steps:
Save the following text in a text file (in this example, it will be referred to as femalebot:
espeak --stdout -v female3 | play -t wav - \
overdrive 10 \
echo 0.8 0.8 5 0.7 \
echo 0.8 0.7 6 0.7 \
echo 0.8 0.7 10 0.7 \
echo 0.8 0.7 12 0.7 \
echo 0.8 0.88 12 0.7 \
echo 0.8 0.88 30 0.7 \
echo 0.6 0.6 60 0.7 \
gain 8
The metallic effect is achieved by using the echo effect with a very short delay. The overdrive enhances the sound a bit, and the other echo effects give the final kick to the robotic voice.
Now, set it to be executable with the chmod command, e.g.
chmod +x /path/to/femalebot
You can now use the robot voice in TTS, by issuing the following command:
echo "All systems online." | /absolute/path/to/femalebot
Additionally, and to make things easier, you can place the script in any directory in the PATH variable. This way, you can issue the last command as follows:
echo "All systems online." | femalebot
I have achieved a female robotic voice, which I explain how to obtain here.
The tools used are
espeak
sox (play)
First, to "say" something with espeak, the TTS engine, you can use the following code:
echo "All systems online" | espeak
The voice the text is read with is the one we want to change. Specifically for the female robotic voice, we are going to use as base voice the female3 voice. We can set espeak to use it with the -v parameter, followed by the name of the voice: e.g.
echo "I sound like a female" | espeak -v female3
Now is when the robotic part comes in. Robotic voices are typically characterized by two things:
Echo
Metallic sound
These effects we can achieve with the sound manipulation application play, which is an interface to sox used solely for playing audio.
You can read the manual on sox
man sox to understand the following code, which will transform normal computer voice into robotic-ish voice. You should read the espeak manual as well.
OBTAINING THE ROBOTIC VOICE
To get the robotic voice, follow these steps:
Save the following text in a text file (in this example, it will be referred to as femalebot:
espeak --stdout -v female3 | play -t wav - \
overdrive 10 \
echo 0.8 0.8 5 0.7 \
echo 0.8 0.7 6 0.7 \
echo 0.8 0.7 10 0.7 \
echo 0.8 0.7 12 0.7 \
echo 0.8 0.88 12 0.7 \
echo 0.8 0.88 30 0.7 \
echo 0.6 0.6 60 0.7 \
gain 8
The metallic effect is achieved by using the echo effect with a very short delay. The overdrive enhances the sound a bit, and the other echo effects give the final kick to the robotic voice.
Now, set it to be executable with the chmod command, e.g.
chmod +x /path/to/femalebot
You can now use the robot voice in TTS, by issuing the following command:
echo "All systems online." | /absolute/path/to/femalebot
Additionally, and to make things easier, you can place the script in any directory in the PATH variable. This way, you can issue the last command as follows:
echo "All systems online." | femalebot