SynthesisRequest
class SynthesisRequest
kotlin.Any | |
↳ | android.speech.tts.SynthesisRequest |
Contains data required by engines to synthesize speech. This data is:
- The text to synthesize
- The synthesis locale, represented as a language, country and a variant. The language is an ISO 639-3 letter language code, and the country is an ISO 3166 alpha 3 code. The variant is not specified.
- The name of the voice requested for this synthesis. May be empty if the client uses
TextToSpeech#setLanguage
instead ofTextToSpeech#setVoice
- The synthesis speech rate, with 100 being the normal, and higher values representing higher speech rates.
- The voice pitch, with 100 being the default pitch.
params
argument in android.speech.tts.TextToSpeech#speak and android.speech.tts.TextToSpeech#synthesizeToFile.
Summary
Public constructors | |
---|---|
SynthesisRequest(text: String!, params: Bundle!) |
|
SynthesisRequest(text: CharSequence!, params: Bundle!) |
Public methods | |
---|---|
Int |
Gets the request caller Uid. |
CharSequence! |
Gets the text which should be synthesized. |
String! |
Gets the ISO 3-letter country code for the language to use. |
String! |
Gets the ISO 3-letter language code for the language to use. |
Bundle! |
Gets the additional params, if any. |
Int |
getPitch() Gets the pitch to use. |
Int |
Gets the speech rate to use. |
String! |
getText() Gets the text which should be synthesized. |
String! |
Gets the language variant to use. |
String! |
Gets the name of the voice to use. |
Public constructors
Public methods
getCharSequenceText
fun getCharSequenceText(): CharSequence!
Gets the text which should be synthesized.
getCountry
fun getCountry(): String!
Gets the ISO 3-letter country code for the language to use.
getLanguage
fun getLanguage(): String!
Gets the ISO 3-letter language code for the language to use.
getSpeechRate
fun getSpeechRate(): Int
Gets the speech rate to use. The normal rate is 100.
getText
fungetText(): String!
Deprecated: As of API level 21, replaced by getCharSequenceText
.
Gets the text which should be synthesized.