Class AutoStartStopAudioSource.Builder

ru.yandex.speechkit

public  class  AutoStartStopAudioSource.Builder 

Class for creating and configuring the AutoStartStopAudioSource object.

Methods

Builder(@NonNull final android.content.Context context)

Creates an object of the AutoStartStopAudioSource.Builder class with mandatory settings.

AutoStartStopAudioSourcebuild()

Creates an object of the AutoStartStopAudioSource class with the passed parameters.

BuildersetBufferCaptureTimeout(final int value)

Sets the interval between the audio fragments the audio source sends to the listeners.

BuildersetSampleRateHz(final int value)

Sets the audio sample rate in Hertz.

Method Detail

Builder

public Builder (@NonNull final android.content.Context context)

Creates an object of the AutoStartStopAudioSource.Builder class with mandatory settings.

Parameters:
context

An object of the Context system class.

build

public AutoStartStopAudioSource build ()

Creates an object of the AutoStartStopAudioSource class with the passed parameters.

Returns:

An object of the AutoStartStopAudioSource class.

setBufferCaptureTimeout

public Builder setBufferCaptureTimeout (final int value)

Sets the interval between the audio fragments the audio source sends to the listeners.

Parameters:
value

The value of the interval in milliseconds.

Returns:

An object of the AutoStartStopAudioSource.Builder class.

setSampleRateHz

public Builder setSampleRateHz (final int value)

Sets the audio sample rate in Hertz.

Parameters:
value

Audio sample rate in Hertz.

Returns:

An object of the AutoStartStopAudioSource.Builder class.