ISynthesisCallback.AudioAvailable(Byte[], Int32, Int32) Method

Definition

The service should call this method when synthesized audio is ready for consumption.

[Android.Runtime.Register("audioAvailable", "([BII)I", "GetAudioAvailable_arrayBIIHandler:Android.Speech.Tts.ISynthesisCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Speech.Tts.OperationResult AudioAvailable (byte[]? buffer, int offset, int length);
[<Android.Runtime.Register("audioAvailable", "([BII)I", "GetAudioAvailable_arrayBIIHandler:Android.Speech.Tts.ISynthesisCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member AudioAvailable : byte[] * int * int -> Android.Speech.Tts.OperationResult

Parameters

buffer
Byte[]

The generated audio data. This method will not hold on to buffer, so the caller is free to modify it after this method returns.

offset
Int32

The offset into buffer where the audio data starts.

length
Int32

The number of bytes of audio data in buffer. This must be less than or equal to the return value of #getMaxBufferSize.

Returns

android.speech.tts.TextToSpeech#SUCCESS, android.speech.tts.TextToSpeech#ERROR or android.speech.tts.TextToSpeech#STOPPED.

Attributes

Remarks

The service should call this method when synthesized audio is ready for consumption.

This method should only be called on the synthesis thread, while in TextToSpeechService#onSynthesizeText.

Java documentation for android.speech.tts.SynthesisCallback.audioAvailable(byte[], int, int).

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