MediaPipeTasksAudio Framework Reference

AudioRecord

class AudioRecord : NSObject

Wrapper class that records audio samples continuously from the device microphone.

  • Audio format of the recording.

    Declaration

    Swift

    var audioDataFormat: AudioDataFormat { get }
  • Size of the internal rolling buffer.

    Declaration

    Swift

    var bufferLength: UInt { get }
  • Initializes a new AudioRecord.

    Declaration

    Swift

    init(audioDataFormat: AudioDataFormat, bufferLength: UInt) throws
  • Starts recording audio from the microphone.

    Declaration

    Swift

    func startRecording() throws
  • Stops recording audio from the microphone.

    Declaration

    Swift

    func stop() throws