Class ManualStartStopAudioSource

ru.yandex.speechkit

java.lang.Object ⇽ ManualStartStopAudioSource

public  class  ManualStartStopAudioSource 

An audio source that lets you control the start and end of audio recording by using the standard device input.

The class is thread-safe, i.e., it can be accessed from different threads. An object of this class is reusable, it can start and stop the audio recording process unlimited number of times. For that, just call the start () method again.

If the app has the "android.permission.RECORD_AUDIO", the audio source will start and begin giving data to listeners. If the app does not have such permission, the audio source will send the listeners an error with the ERROR_AUDIO_PERMISSIONS code in the onAudioSourceError (AudioSource, Error) method.

Nested Classes

Methods

voidstart()

Starts recording audio using the standard device input.

Method Detail

start

public void start ()

Starts recording audio using the standard device input.

Asynchronous execution. When the audio source is ready to transmit audio, the listeners will have the onAudioSourceStarted(AudioSource) method called.