(TTS) eSpeak Command in LINUX

Swaroop Shinde
3 min readSep 19, 2021

--

espeak-ng is a TTS(TEXT TO SPEECH) Command in LINUX OS which means, in Simple Language whatever text we’ll Type after espeak-ng command, THE LINUX OS will speak out the text which can also be further Differentiated Depending upon the Syntax which we will see Further. We will Execute this Practically But For now,

The Syntax is : espeak-ng “<TEXT>”

espeak-ng Command

#) Now, at this point The Command will Speak Out in a very Robotic Accent and a Heavy Voice which is not Properly Understandable so,

+++++++++CHANGE PITCH OF VOICE IN ESPEAK COMMAND+++++++

#) It’s Very Easy to Change the Pitch of Default voice by just typing the

#) Syntax : espeak-ng -p <pitch value> <”TEXT”>

#) Example. espeak-ng -p 100 “HELLO WORLD”

#) NOTE : Here -p denotes PITCH and the value as you go higher in value, the Voice gets Thiner. By Default its 50 and can be changed up to 99.

Changing Pitch Of Espeak-ng Command

#) Now, We’ve Changed the Pitch of the Sound so that its a bit more clear. but there still arise a problem at the Speed of Speaking out the text, Example long sentences if spoken out in fast manner are not properly understandable so,

+++++++++CHANGE SPEED OF VOICE IN ESPEAK COMMAND+++++++

#) Similarly as of Pitch, the Speed can be Controlled using,

#) Syntax : espeak-ng -s <speed value> <”TEXT”>

#) Example. espeak-ng -s 100 “HELLO WORLD AM I CLEARLY AUDIBLE”

#) NOTE : Here the Speed is Measured in Words Spoken Out Per Minute which By Default is 175.

Changing Speed of Voice in LINUX

#) Now, Let’s Change the PITCH & SPEED both at Same Time!

#) Syntax : espeak-ng -p <PITCH> -s <SPEED> “<TEXT>”

#) Example: espeak-ng -s 75 -p 99 “HELLO WORD AM I CLEARLY AUDIBLE”

Changing Speed & Pitch Both at Same Time

#) Now Whatever experiments we are Doing Here with the Voice, by default its affecting on Male Voice, so to change it Female Voice

++++++++++++CHANGING VOICE FROM MALE TO FEMALE+++++++++

#) Syntax : espeak-ng -v en+f2 <”TEXT”>

Example : espeak-ng -v en+f2 “WELCOME TO LINUX WORLD”

#) NOTE : Here -v means we have to provide a different voice to the command. en is the Language Code & f2 is the Voice Code.

#) Till Now we Have Controlled The Pitch, Speed & Voice of the Command. What if Someone Doesn’t Understand English or Not Comfortable with it. So Lets Change the Language Too!

+++++++++CHANGING LANGUAGE IN ESPEAK COMMAND+++++++++

#) Syntax : espeak-ng -v <LANGUAGE CODE> “<TEXT>”

#) Example : espeak-ng -v it “WELCOME TO LINUX WORLD” or espeak-ng -v hu “WELCOME TO LINUX WORLD” where it is Italian & hu is Hungarian.

#) NOTE : There are Some Limitations in terms of Languages, It Doesn’t Support all Languages to Speak Out!

Changing Language, Speed, Pitch & Voice in LINUX

SINCE WE HAVE COVRED ALMOST EVERY REQUIRED TOPIC FOR THE ESPEAK COMMAND, LET’S IMPLEMENT IT IN THE VIDEO DOWNLOAD LINK GIVEN BELOW!!

--

--

Swaroop Shinde
Swaroop Shinde

Written by Swaroop Shinde

Hey There 👋 If You’re A Tech & DevOps Enthusiast, Then You’re on the Right Medium Profile. Make sure you stay Connected & Don’t miss an Opportunity to Learn !

No responses yet