MediaPipeTasksAudio Framework Reference

AudioClassifierOptions

class AudioClassifierOptions : TaskOptions, NSCopying

Options for setting up an AudioClassifier.

  • Running mode of the audio classifier task (.audioClips or .audioStream).

    Declaration

    Swift

    var runningMode: RunningMode
  • Delegate notified of asynchronous classification results in .audioStream mode.

    Declaration

    Swift

    weak var audioClassifierLiveStreamDelegate: AudioClassifierLiveStreamDelegate?
  • Locale used for display names from model metadata.

    Declaration

    Swift

    var displayNamesLocale: String
  • Maximum number of top-scored classification results to return.

    Declaration

    Swift

    var maxResults: Int
  • Score threshold below which results are rejected.

    Declaration

    Swift

    var scoreThreshold: Float
  • Allowlist of category names.

    Declaration

    Swift

    var categoryAllowlist: [String]
  • Denylist of category names.

    Declaration

    Swift

    var categoryDenylist: [String]