Explore espeak-ng command in Linux

SYNOPSIS

>> espeak-ng [options] [words]
>> espeak-ng --version

espeak-ng commands

>> man espeak-ng
>> espeak-ng 
Working of espeak-ng
>> espeak-ng "welcome to espeak-ng blog"
>> espeak-ng -f textToVoice.txt
OR
>> cat textToVoice.txt | espeak-ng
>> <command> | espeak-ng
>> date | espeak-ng

Different Languages using espeak-ng

>> espeak-ng --vioces
>> espeak-ng --voices=<language>

Variation In Voices

Syntax

>> espeak-ng <text> -v <variation>
  • f1 to f5 this will gives different variations in a female voice
 >> espeak-ng hello -v f3
  • m1 to m7 this gives different variations in a male voice
>> espeak-ng hello -v m6
>> espeak-ng <text> -v <language>+<variation>
>> espeak-ng "hello alexa" -v fr+f2

Welcome User with voice using espeak-ng

>> sudo /etc/bashrc
echo "Hey! `users`, Welcome to Redhat linux world" | espeak-ng -g 12ms -k30 -p 14
  • Above command echo will output espeak will take input and speak
  • `users` is a command that gives the current user in OS
  • Option “-g” gives a gap between each word
  • Option “-k” reads in high when the capital letter comes
  • Option “-p” will pitch voice level

Let’s explore a bit more, now going to use different languages for the same task

echo "ನಮಸ್ತೆ `users`, ಸುಸ್ಸ್ವಾಗತ ನಮ್ಮ redhat linux ಪ್ರಪಂಚಗಿ" | espeak-ng -g 10ms   -s 170 -v kn+f2
  • Above command echo will output espeak will take input and speak
  • `users` is a command that gives the current user in OS
  • Option “-g” gives a gap between each word
  • Option “-k” reads in high when a capital letter comes
  • Option “-p” will pitch voice level
  • Option “-v” takes which language and variation of language and speaks
  • Option “-s” speed the voice, by default is 160, here we increased to 170.

Some other options in espeak-ng

  • Change the amplitude of the audio from 0 to 200 default value of the amplitude is 100.
For changing Amplitude>> espeak-ng -a <integer> "<Text>"  

//here integer means the value of sound amplitude
  • If we want to speak the text with order device we can use -d option for that.
>> espeak-ng -d <device>
  • We can also create an wave file with the option -w.
>> espeak-ng -w <file name> "<Text>"
  • Not the last but, we can use -q option to quite, which will not produce any speech.
# espeak-ng -q
  • Many more you can learn by researching using “man espeak-ng” or “espeak-ng — help”

--

--

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