<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/AudioConvertingTransformer",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents26AudioConvertingTransformerV"
  },
  "title" : "AudioConvertingTransformer"
}
-->

# AudioConvertingTransformer

A transformer for audio conversion.

```
struct AudioConvertingTransformer
```

## Topics

### Creating the transformer

[`init(targetFormat: AVAudioFormat)`](/documentation/CreateMLComponents/AudioConvertingTransformer/init(targetFormat:))

Creates an audio conversion transformer to convert the format of the buffers.

### Getting the properties

[`let targetFormat: AVAudioFormat`](/documentation/CreateMLComponents/AudioConvertingTransformer/targetFormat)

The target audio format for the output buffers. It must have an AVAudioPCMFormat as its common format type.

### Applying the transformer

[`func applied(to: AVAudioPCMBuffer, eventHandler: EventHandler?) throws -> AVAudioPCMBuffer`](/documentation/CreateMLComponents/AudioConvertingTransformer/applied(to:eventHandler:))

Performs conversion of the input audio buffer.

## Relationships

### Conforms To

[`Transformer`](/documentation/CreateMLComponents/Transformer)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Copyable`](/documentation/Swift/Copyable)

[`Escapable`](/documentation/Swift/Escapable)

---

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)