<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLSoundClassifier/DataSource/labeledFiles(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML17MLSoundClassifierV10DataSourceO12labeledFilesyAE10Foundation3URLV_tcAEmF"
  },
  "title" : "MLSoundClassifier.DataSource.labeledFiles(at:)"
}
-->

# MLSoundClassifier.DataSource.labeledFiles(at:)

Creates a data source from a folder that contains audio files, each named after the sound they represent.

```
case labeledFiles(at: URL)
```

## Parameters

`at`

URL: The URL to a folder in the file system that contains audio files. The data source uses the
first component of each audio file’s name as its classification label.

## Discussion

Create a sound classifier data source from a directory of audio files with the `labeledFiles` case. You
must name each file with a sound classification label, followed by a period and an arbitrary string, ending
with the file extension. For example, you can name a sound classifier’s training files as `Laughter.3.png`,
`Applause.1.jpg`, `Applause.2.jpg`, and so on.

In this example, these audio file names give a sound classifier at least two class labels:

- `Laughter`
- `Applause`

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)