Espeak-ng
What is espeak-ng?
The eSpeak NG is a compact open-source software text-to-speech synthesizer for Linux, Windows, Android, and other operating systems. It supports more than 100 languages and accents. It is based on the eSpeak engine created by Jonathan Duddington.
eSpeak NG uses a “formant synthesis” method. This allows many languages to be provided in a small size. The speech is clear, and can be used at high speeds, but is not as natural or smooth as larger synthesizers which are based on human speech recordings.
eSpeak NG is available as:
- A command-line program (Linux and Windows) to speak text from a file or from stdin.
- A shared library version for use by other programs. (On Windows this is a DLL).
- eSpeak NG has been ported to other platforms, including Solaris and Mac OSX.
Features:
- Includes different Voices, whose characteristics can be altered.
- Can produce speech output as a WAV file.
- SSML (Speech Synthesis Markup Language) is supported (not complete), and also HTML.
- Compact size. The program and its data, including many languages, totals about a few Mbytes.
- Can translate text into small codes, so it could be adapted as a front end for another speech synthesis engine.
- Potential for other languages. Several are included in varying stages of progress. Help from native speakers of these or other languages is welcome.
- Written in C.
Set volume
Using the given below command set the volume of the speech and volume range is 0 to 200. The default is 100.
[root@localhost~]#espeak-ng -v en “ this is test line” -a 200
Set Speed
Using the given below command set the Speed word per minute of the speech and The default value is 175. I generally use a faster speed of 260. The lower limit is 80. There is no upper limit, but about 500 is probably a practical maximum.
[root@localhost~]#espeak-ng -v en “ this is test line” -s 140
Text file speak
Using the given below command to Speak the contents of any file using the default English voice.
[root@localhost~]#espeak-ng -f <filename>[root@localhost~]#cat <filename> | espeak-ng
Both commands will work the same. you can use any .txt file like: test.txt
Options:
- -h, — help
show Summary of options. - — version
Prints the espeak library version and the location of the espeak voice data.
3. -f <text file>: It will text file to speak.
4. — stdin: It will read text input from stdin till to the end of a stream at once.
5. -d <device>
Use the specified device to speak the audio on. If not specified, the default audio device is used.
6. -v <voice name>
Use voice file of this name from espeak-ng-data/voices. A variant can be specified using voice+variant, such as af+m3.
7. -w <wave file name>
Write output to this WAV file, rather than speaking it directly.
8. — split=<minutes>
Used with -w to split the audio output into <minutes> recorded chunks.
9. — voices[=<language code>]
Lists the available voices. If =<language code> is present then only those voices which are suitable for that language are listed.