VoiceRecorderAdapter¶
Adapter for protocol VoiceRecorderListener. All methods do nothing.
VoiceRecorderAdapter is a convenience class for implementing the VoiceRecorderListener protocol, thus overriding only the necessary methods.
Public Methods¶
public init()
Constructor of the class.
open func onAudioInfo(_ audioInfo: AudioInfo)
Called whenever:
- A `requestAudioInfo()` is called.
- Periodically if `isAutoAudioInfo` is set to true.
-
Parameters:
- audioinfo: information of the audio recorded.
open func onRecordedAudio(_ wrapper: SignalWrapper)
Called whenever:
- A `requestRecordedAudio()` is called.
- When the voice duration and quality requirements are met and`isAutoVoiceCapture` is set to true.
-
Parameters:
- wrapper: wrapper of a signal.
open func onRecordedVoice(_ wrapper: SignalWrapper)
Called whenever:
- A `requestRecordedVoice()` is called.
- When the voice duration and quality requirements are met and`isAutoVoiceCapture` is set to true.
-
Parameters:
- wrapper: wrapper of a signal.
open func onRecorderState(_ state: Int)
Called whenever a state change is performed.
-
Parameters:
- state: state changed to.
open func onError(_ error: AudioInputError)
Called whenever an error occurs while recording audio.
-
Parameters:
- error: error occurred.