Udostępnij za pośrednictwem


TextToSpeech.PlaySilentUtterance(Int64, QueueMode, String) Method

Definition

Plays silence for the specified amount of time using the specified queue mode.

[Android.Runtime.Register("playSilentUtterance", "(JILjava/lang/String;)I", "GetPlaySilentUtterance_JILjava_lang_String_Handler")]
public virtual Android.Speech.Tts.OperationResult PlaySilentUtterance (long durationInMs, Android.Speech.Tts.QueueMode queueMode, string? utteranceId);
[<Android.Runtime.Register("playSilentUtterance", "(JILjava/lang/String;)I", "GetPlaySilentUtterance_JILjava_lang_String_Handler")>]
abstract member PlaySilentUtterance : int64 * Android.Speech.Tts.QueueMode * string -> Android.Speech.Tts.OperationResult
override this.PlaySilentUtterance : int64 * Android.Speech.Tts.QueueMode * string -> Android.Speech.Tts.OperationResult

Parameters

durationInMs
Int64

The duration of the silence.

queueMode
QueueMode

#QUEUE_ADD or #QUEUE_FLUSH.

utteranceId
String

An unique identifier for this request.

Returns

#ERROR or #SUCCESS of <b>queuing</b> the playSilentUtterance operation.

Attributes

Remarks

Plays silence for the specified amount of time using the specified queue mode. 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 #setOnUtteranceProgressListener) and using the Engine#KEY_PARAM_UTTERANCE_ID parameter.

Java documentation for android.speech.tts.TextToSpeech.playSilentUtterance(long, int, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to