Use of espeak-ng command in linux

Himavarsha Madala
3 min readSep 17, 2021

eSpeak is a command line tool for Linux that converts text to speech. This is a compact speech synthesizer that provides support to English and many other languages. It is written in C. eSpeak reads the text from the standard input or the input file. The voice generated, however, is nowhere close to a human voice. But it is still a compact and handy tool if you want to use it in your projects. Speaks text from a file or from stdin and Shared library version for use by other programs.

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 few Mbytes.
  • Can be used as a front-end to MBROLA diphone voices. eSpeak NG converts text to phonemes with pitch and length information.
  • Can translate text into phoneme 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 for these or other languages is welcome.
  • Written in C.

eSpeak Compatibility

The espeak-ng binaries use the same command-line options as espeak, with several additions to provide new functionality from espeak-ng such as specifying the output audio device name to use. The build creates symlinks of espeak to espeak-ng, and speak to speak-ng.

1.Text to speech

#espeak-ng "hello"

2.We can use text to speech using selected language

#espeak-ng -v af "hello"

3.We can use all voices supported by eSpeak and i selected afrikaans as a speech.

#espeak-ng --voices

4.here we can use man espeak-ng to control as our requirements

#man espeak-ng

5.here we use espeak-ng speech to date in english

#date | espeak-ng  -v  en

6.this command reads the text file to speech

#cat hello.txt | espeak-ng

--

--