Guest User

Untitled

a guest
Jan 21st, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. let utterance = AVSpeechUtterance(string: "Hello world")
  2.  
  3. // Method 1: Directly by identifier
  4. utterance.voice = AVSpeechSynthesisVoice(identifier: "com.apple.ttsbundle.Karen-compact")
  5.  
  6. // Method 2: By langauge code
  7. // What will be chosen? Compact one or Enhanced one?
  8. utterance.voice = AVSpeechSynthesisVoice(language: "en-AU")
Add Comment
Please, Sign In to add comment