Class YSKMutingAudioSource

Implementation of the YSKAudioSource interface, which suspends an audio that comes through an audio source.

Used for additional processing of the audio that comes through the audio source. This implementation can be used in any class that uses the YSKAudioSource protocol. 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.

Instance Methods

-initWithAudioSource:

Initializes an object of the YSKMutingAudioSource class.

-muteAudio:

Pauses/starts an audio stream for recognition.

Method Detail

-initWithAudioSource:

- (instancetype)initWithAudioSource:(id< YSKAudioSource >)audioSource 

Initializes an object of the YSKMutingAudioSource class.

The object of the YSKMutingAudioSource class does not record an audio from the speaker of a device, file, or any other source, it only applies some algorithm to the incoming audio. So to enable it, specify the audio source that will record an audio and transmit it to the object of the YSKMutingAudioSource class.
Parameters:
audioSource

The audio source from which an audio is received for processing.

Returns:

An object of the YSKMutingAudioSource class.

-muteAudio:

- (void)muteAudio:(BOOL)shouldMute 

Pauses/starts an audio stream for recognition.

Parameters:
shouldMute

Flag indicating whether the audio stream is sent for recognition. Acceptable values: YES — the audio coming from the audio source will not be sent for recognition; NO — the audio coming from the audio source will be sent for recognition.