---
title: "init(from:to:)"
framework: avfaudio
role: symbol
role_heading: Initializer
path: "avfaudio/avaudioconverter/init(from:to:)"
---

# init(from:to:)

Creates an audio converter object from the specified input and output formats.

## Declaration

```swift
init?(from fromFormat: AVAudioFormat, to toFormat: AVAudioFormat)
```

## Parameters

- `fromFormat`: The input audio format.
- `toFormat`: The audio format to convert to.

## Return Value

Return Value An AVAudioConverter instance, or nil if the format conversion isn’t possible.
