MediaPipeTasksAudio Framework Reference

AudioData

class AudioData : NSObject

Wrapper class for input audio samples backed by a ring buffer.

  • Audio format specifying channel count and sample rate.

    Declaration

    Swift

    var format: AudioDataFormat { get }
  • Capacity of the AudioData buffer in number of elements.

    Declaration

    Swift

    var bufferLength: UInt { get }
  • Initializes a new AudioData with the given format and sample count.

    Declaration

    Swift

    init(format: AudioDataFormat, sampleCount: UInt)
  • Loads the internal buffer from an AudioRecord instance.

    Declaration

    Swift

    func load(audioRecord: AudioRecord) throws