Enumeration

MLSoundClassifier.DataSource

An enumeration that describes various ways to label audio-file URLs stored on disk.

Declaration

enum MLSoundClassifier.DataSource

Topics

Creating a Data Source

case labeledFiles(at: URL)

The data source’s associated labeled files.

case labeledDirectories(at: URL)

The associated labeled directories.

Retrieving the Data

func labeledSounds() -> [String : [URL]]

Returns the data source’s audio files labeled by sound category.

See Also

Creating and Training a Sound Classifier

init(trainingData: [String : [URL]], parameters: MLSoundClassifier.ModelParameters)

Creates a sound classifier from a training data set represented by a dictionary.

init(trainingData: MLSoundClassifier.DataSource, parameters: MLSoundClassifier.ModelParameters)

Creates a sound classifier from a training data set represented by a data source.

struct MLSoundClassifier.ModelParameters

A structure that describes additional model parameters that you can set on the sound classifier.

let modelParameters: MLSoundClassifier.ModelParameters

The configuration parameters used to train the model during initialization.