Most visited

Recently visited

Added in API level 14

SynthesisRequest

public final class SynthesisRequest
extends Object

java.lang.Object
   ↳ android.speech.tts.SynthesisRequest


Contains data required by engines to synthesize speech. This data is:

Any additional parameters sent to the text to speech service are passed in uninterpreted, see the params argument in speak(CharSequence, int, Bundle, String) and synthesizeToFile(CharSequence, Bundle, File, String).

Summary

Public constructors

SynthesisRequest(String text, Bundle params)
SynthesisRequest(CharSequence text, Bundle params)

Public methods

int getCallerUid()

Gets the request caller Uid.

CharSequence getCharSequenceText()

Gets the text which should be synthesized.

String getCountry()

Gets the ISO 3-letter country code for the language to use.

String getLanguage()

Gets the ISO 3-letter language code for the language to use.

Bundle getParams()

Gets the additional params, if any.

int getPitch()

Gets the pitch to use.

int getSpeechRate()

Gets the speech rate to use.

String getText()

This method was deprecated in API level 21. As of API level 21, replaced by getCharSequenceText().

String getVariant()

Gets the language variant to use.

String getVoiceName()

Gets the name of the voice to use.

Inherited methods

From class java.lang.Object

Public constructors

SynthesisRequest

Added in API level 14
SynthesisRequest (String text, 
                Bundle params)

Parameters
text String
params Bundle

SynthesisRequest

Added in API level 21
SynthesisRequest (CharSequence text, 
                Bundle params)

Parameters
text CharSequence
params Bundle

Public methods

getCallerUid

Added in API level 19
int getCallerUid ()

Gets the request caller Uid.

Returns
int

getCharSequenceText

Added in API level 21
CharSequence getCharSequenceText ()

Gets the text which should be synthesized.

Returns
CharSequence

getCountry

Added in API level 14
String getCountry ()

Gets the ISO 3-letter country code for the language to use.

Returns
String

getLanguage

Added in API level 14
String getLanguage ()

Gets the ISO 3-letter language code for the language to use.

Returns
String

getParams

Added in API level 14
Bundle getParams ()

Gets the additional params, if any.

Returns
Bundle

getPitch

Added in API level 14
int getPitch ()

Gets the pitch to use. The normal pitch is 100.

Returns
int

getSpeechRate

Added in API level 14
int getSpeechRate ()

Gets the speech rate to use. The normal rate is 100.

Returns
int

getText

Added in API level 14
String getText ()

This method was deprecated in API level 21.
As of API level 21, replaced by getCharSequenceText().

Gets the text which should be synthesized.

Returns
String

getVariant

Added in API level 14
String getVariant ()

Gets the language variant to use.

Returns
String

getVoiceName

Added in API level 21
String getVoiceName ()

Gets the name of the voice to use.

Returns
String

Hooray!