Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let utterance = AVSpeechUtterance(string: "Hello world")
- // Method 1: Directly by identifier
- utterance.voice = AVSpeechSynthesisVoice(identifier: "com.apple.ttsbundle.Karen-compact")
- // Method 2: By langauge code
- // What will be chosen? Compact one or Enhanced one?
- utterance.voice = AVSpeechSynthesisVoice(language: "en-AU")
Add Comment
Please, Sign In to add comment