Android.Speech.Tts.TextToSpeech.Speak Method
Speaks the text using the specified queuing strategy and speech parameters, the text may be spanned with TtsSpans.

Syntax

[Android.Runtime.Register("speak", "(Ljava/lang/CharSequence;ILandroid/os/Bundle;Ljava/lang/String;)I", "GetSpeak_Ljava_lang_CharSequence_ILandroid_os_Bundle_Ljava_lang_String_Handler")]
[return:Android.Runtime.GeneratedEnum]
public virtual OperationResult Speak (Java.Lang.ICharSequence text, [Android.Runtime.GeneratedEnum] QueueMode queueMode, Android.OS.Bundle params, string utteranceId)

Parameters

text
The string of text to be spoken. No longer than TextToSpeech.MaxSpeechInputLength characters.
queueMode
The queuing strategy to use, TextToSpeech.QUEUE_ADD or TextToSpeech.QUEUE_FLUSH.
params
Parameters for the request. Can be null. Supported parameter names: NoType:android/speech/tts/TextToSpeech$Engine;Href=../../../../reference/android/speech/tts/TextToSpeech.Engine.html#KEY_PARAM_STREAM, NoType:android/speech/tts/TextToSpeech$Engine;Href=../../../../reference/android/speech/tts/TextToSpeech.Engine.html#KEY_PARAM_VOLUME, NoType:android/speech/tts/TextToSpeech$Engine;Href=../../../../reference/android/speech/tts/TextToSpeech.Engine.html#KEY_PARAM_PAN. Engine specific parameters may be passed in but the parameter keys must be prefixed by the name of the engine they are intended for. For example the keys "com.svox.pico_foo" and "com.svox.pico:bar" will be passed to the engine named "com.svox.pico" if it is being used.
utteranceId
An unique identifier for this request.

Returns

Documentation for this section has not yet been entered.

Remarks

Speaks the text using the specified queuing strategy and speech parameters, the text may be spanned with TtsSpans. This method is asynchronous, i.e. the method just adds the request to the queue of TTS requests and then returns. The synthesis might not have finished (or even started!) at the time when this method returns. In order to reliably detect errors during synthesis, we recommend setting an utterance progress listener (see TextToSpeech.SetOnUtteranceProgressListener(UtteranceProgressListener)) and using the NoType:android/speech/tts/TextToSpeech$Engine;Href=../../../../reference/android/speech/tts/TextToSpeech.Engine.html#KEY_PARAM_UTTERANCE_ID parameter.

[Android Documentation]

Requirements

Namespace: Android.Speech.Tts
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 4