IbrahimHassan

speech synthesis

May 16th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. private let speechSynthesiser = AVSpeechSynthesizer()
  2.  
  3.  
  4. {
  5. if let text = self.convertedTV.text {
  6. let reversedText = text.reversed()
  7.  
  8. }
  9. let speechUtterance = AVSpeechUtterance(string: "H e l l o W o r l d")
  10.  
  11. speechUtterance.rate = 0.35
  12. speechUtterance.volume = 1.0
  13. speechSynthesiser.stopSpeaking(at: .word)
  14.  
  15. speechSynthesiser.speak(speechUtterance)
  16.  
  17. }
Add Comment
Please, Sign In to add comment