Class MutingAudioSource

ru.yandex.speechkit

java.lang.Object ⇽ MutingAudioSource

public  class  MutingAudioSource 

Implementation of the AudioSource interface that suspends an audio that comes through an audio source.

Used for additional processing of the audio coming through the audio source. This implementation can be used in any class that works with this interface. This class does not record an audio, it only applies additional processing to it. Hence, it should only be used together with another audio source.

Constructors

MutingAudioSource(@NonNull final AudioSource audioSource)

Creates an object of the MutingAudioSource class.

Methods

voidmuteAudio(final boolean mute)

Pauses/starts an audio stream for recognition.

Constructor Detail

MutingAudioSource

public MutingAudioSource (@NonNull final AudioSource audioSource)

Creates an object of the MutingAudioSource class.

Parameters:
audioSource

Audio source.

Method Detail

muteAudio

public void muteAudio (final boolean mute)

Pauses/starts an audio stream for recognition.

Parameters:
mute

Flag indicating whether the audio stream is sent for recognition. Acceptable values: true - the audio coming from the audio source will not be sent for recognition; false - the audio coming from the audio source will be sent for recognition.