---
title: "init(ssmlRepresentation:)"
framework: avfaudio
role: symbol
role_heading: Initializer
path: "avfaudio/avspeechutterance/init(ssmlrepresentation:)-8zam9"
---

# init(ssmlRepresentation:)

Creates a speech utterance with an Speech Synthesis Markup Language (SSML) string.

## Declaration

```swift
init?(ssmlRepresentation string: String)
```

## Parameters

- `string`: A string to speak that contains valid SSML markup. The initializer returns nil if you pass an invalid SSML string.

## Discussion

Discussion If using SSML to request voices that fall under certain attributes, the system may split a single utterance into multiple parts and send each to an appropriate synthesizer. If no voice matches the properties, the utterance uses the voice set in its voice property. If you don’t specify a voice, the system uses its default voice. note: Speech utterance properties that affect the prosody of a voice, such as its rate and pitchMultiplier, don’t apply to an utterance that uses an SSML representation.

## See Also

### Creating an utterance

- [init(string:)](avfaudio/avspeechutterance/init(string:).md)
- [init(attributedString:)](avfaudio/avspeechutterance/init(attributedstring:).md)
- [AVSpeechSynthesisIPANotationAttribute](avfaudio/avspeechsynthesisipanotationattribute.md)
