multilingual VoiceOver string

Is it possible to use SSML to provide a VO string in multiple languages. For instance, a label in English, but you want it to speak a phrase within that sentence in Spanish for a proper noun.

Answered by Engineer in 891347022

While SSML isn't supported, in some cases an attributed string can be used to specify the language, for example:

let text = NSAttributedString(
    string: "pain",
    attributes: [.accessibilityLanguage: "fr"]
)

VoiceOver does not yet support SSML directly, although AVSpeechSynthesizer does. This is good feedback and I want to make sure we capture it.

You can file the feedback here: https://developer.apple.com/bug-reporting/

Once you do, feel free to reply with the Feedback ID. Thanks!

Thank you! FB23037860

While SSML isn't supported, in some cases an attributed string can be used to specify the language, for example:

let text = NSAttributedString(
    string: "pain",
    attributes: [.accessibilityLanguage: "fr"]
)
multilingual VoiceOver string
 
 
Q