public
final
class
SynthesisRequest
extends Object
| java.lang.Object | |
| ↳ | android.speech.tts.SynthesisRequest |
Contains data required by engines to synthesize speech. This data is:
setLanguage(Locale) instead of
setVoice(Voice)params argument in speak(CharSequence, int, Bundle, String)
and synthesizeToFile(CharSequence, Bundle, File, String).
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 |
String
|
getVariant()
Gets the language variant to use. |
String
|
getVoiceName()
Gets the name of the voice to use. |
Inherited methods | |
|---|---|
java.lang.Object
| |
SynthesisRequest (String text, Bundle params)
| Parameters | |
|---|---|
text |
String
|
params |
Bundle
|
SynthesisRequest (CharSequence text, Bundle params)
| Parameters | |
|---|---|
text |
CharSequence
|
params |
Bundle
|
CharSequence getCharSequenceText ()
Gets the text which should be synthesized.
| Returns | |
|---|---|
CharSequence |
|
String getCountry ()
Gets the ISO 3-letter country code for the language to use.
| Returns | |
|---|---|
String |
|
String getLanguage ()
Gets the ISO 3-letter language code for the language to use.
| Returns | |
|---|---|
String |
|
Bundle getParams ()
Gets the additional params, if any.
| Returns | |
|---|---|
Bundle |
|
int getPitch ()
Gets the pitch to use. The normal pitch is 100.
| Returns | |
|---|---|
int |
|
int getSpeechRate ()
Gets the speech rate to use. The normal rate is 100.
| Returns | |
|---|---|
int |
|
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 |
|
String getVariant ()
Gets the language variant to use.
| Returns | |
|---|---|
String |
|
String getVoiceName ()
Gets the name of the voice to use.
| Returns | |
|---|---|
String |
|