eSpeak can generate text-to-speech (TTS) audio files. This is useful for many purposes, such as creating audible CAPTCHA tests.
Install eSpeak.
# apt install espeak
Create a test WAV file with the following parameters.
Speed: 100
# espeak "y j w c t j" -w /tmp/espeak-talk.wav -g 60 -p 70 -s 100
eSpeak supports text file input. Create /tmp/example.txt
# echo "The quick brown fox jumps over the lazy dog." > /tmp/example.txt
Generate the WAV file.
# espeak -f /tmp/example.txt -w /tmp/example.wav
eSpeak supports different voices. List the installed voices.
# espeak --voices
Pty Language Age/Gender VoiceName File Other Languages
5 af M afrikaans other/af
5 an M aragonese europe/an
5 bg - bulgarian europe/bg
5 bs M bosnian europe/bs
5 ca M catalan europe/ca
5 cs M czech europe/cs
...
Use the -v parameter to generate an example audio file with the afrikaans voice.
# espeak -v af -f /tmp/example.txt -w /tmp/exampleaf.wav
See the eSpeak documentation for more information.
You could earn up to $300 by adding new articles