Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Set URL to save file to disk
- if let speechFileURL = NSURL(string: speechFilePath) {
- speechSynth.startSpeakingString(spokenText, toURL: speechFileURL) // Speak to file
- }
- else {
- dialogAlert("Invalid File: ", text: speechFileName)
- }
- while(NSSpeechSynthesizer.isAnyApplicationSpeaking() == true) {
- if self.gUserClickedStop {
- speechSynth.stopSpeaking()
- self.gIsSpeaking = false
- break
- }
- }
- dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)) { [unowned self] in
- self.parseTheScript()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement