Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Control speed of TextToSpeech (TTS)

Tags:

android

Is there any way I can have greater control over "how" the TTS is saying instead of "what" it is saying?

  • pitch
  • speed of pronunciation
  • male/female
  • any other options?

The API comes up short

like image 351
Mark Lapasa Avatar asked Jan 06 '12 01:01

Mark Lapasa


People also ask

How I reduce Text speech speed?

Tap the Settings icon . Scroll down and tap Accessibility. Scroll down and tap Text-to-speech output. Adjust the sliders for Speech Rate and Pitch.

How do I slow down Text-to-speech on Android?

Change Read Aloud settings for Android phone To change the speech rate, in the Read Aloud controls, tap the gear icon. Under Audio Settings, adjust the Speech Rate Slider to increase or decrease the reading speed.


2 Answers

Just came across this and surprised nobody had answered.

Try using setPitch or setSpeechRate.

http://developer.android.com/reference/android/speech/tts/TextToSpeech.html#setPitch(float)

like image 94
tafka Avatar answered Oct 26 '22 00:10

tafka


With TTS u can use these methods to control speak

  • addSpeech(String text, String filename) //This method adds a mapping between a string of text and a sound file.
  • getLanguage() ////This method returns a Localeinstance describing the language.
  • isSpeaking()//This method checks whether the TextToSpeech engine is busy speaking.
  • setPitch(float pitch)//This method sets the speech pitch for the TextToSpeech engine.
  • setSpeechRate(float speechRate)//This method sets the speech rate.
  • shutdown()//This method releases the resources used by the TextToSpeech
  • stop()//This method stop the speak.
like image 45
Coder29 Avatar answered Oct 25 '22 23:10

Coder29