What is espeak-ng?

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.


  • 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

[root@localhost~]#espeak-ng -v en “ this is test line” -a 200

Set Speed

[root@localhost~]#espeak-ng -v en “ this is test line” -s 140

Text file speak

[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


  1. -h, — help
    show Summary of options.
  2. — 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.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store