accessibilitySpeechIPANotation is useful for indicating how foreign words are pronounced. It really annoys me to hear the word paella constantly mispronounced 😁. You could also specify language, but this way, VoiceOver won't change its voice.

Example, with a drawing of the paella emoji, shows how you can specify the correct pronunciation for the text “paella” using the IPA notation. The code sets an accessibilityAttributeLabel to the UILabel with the string and a dictionary containing the accessibilitySpeechIPANotation attribute key and the “pɑːˈeɪə” value.

Example code in the image:

let recipeNameLabel = UILabel()
let attributedLabel = NSAttributedString(
    string: "Paella",
    attributes: [.accessibilitySpeechIPANotation: "pɑːˈeɪə"]
)

recipeNameLabel.accessibilityAttributedLabel = attributedLabel