MediaPipeTasksAudio Framework Reference

AudioClassifierResult

class AudioClassifierResult: TaskResult, NSCopying

Represents the classification results generated by AudioClassifier. *

  • Initializes a new AudioClassifierResult with the given array of ClassificationResult objects and timestamp (in milliseconds).

    Declaration

    Swift

    init(classificationResults: [ClassificationResult], timestampInMilliseconds: Int)

    Parameters

    classificationResults

    The array of ClassificationResult objects each containing one set of results per classifier head.

    timestampInMilliseconds

    The timestamp (in milliseconds) for this result.

    Return Value

    An instance of AudioClassifierResult initialized with the given ClassificationResult and timestamp (in milliseconds).

  • A list of timestamped ClassificationResult objects, each containing one set of results per classifier head. In the "audio stream" mode, the list only contains one element, representing the classification result of the audio block that starts at ClassificationResult.timestampInMilliseconds in the audio stream. Otherwise, in the "audio clips" mode, the list may include multiple ClassificationResult objects, each classifying an interval of the entire audio clip that starts at ClassificationResult.timestampInMilliseconds.

    Declaration

    Swift

    var classificationResults: [ClassificationResult] { get }