Skip to content

VoiceRecorderListener

Protocol for a listener that wants to receive messages from the AudioThread. Consider using the VoiceRecorderAdapter instead.

Public Methods

func onAudioInfo(_ audioInfo: AudioInfo)

Called whenever:

- A `requestAudioInfo()` is called.
- Periodically if `isAutoAudioInfo` is set to true.
  • Parameters:

    • audioinfo: information of the audio recorded.
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.
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.
func onRecorderState(_ state: Int)

Called whenever a state change is performed.

  • Parameters:

    • state: state changed to.
func onError(_ error: AudioInputError)

Called whenever an error occurs while recording audio.

  • Parameters:

    • error: error occurred.