I get the following message when I try the code below:
2014-07-28 13:19:14.251 MySingleView[3750:461865] Speech initialization error: 2147483665
Am I doing something wrong, or is this a bug?
I'm running this in an iPad 2 simulator on my Mac running Mavericks using Xcode6 - Beta 4.
import UIKit
import AVFoundation
class ViewController: UIViewController {
var voice = AVSpeechSynthesizer()
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
@IBAction func buttonPushed(sender: UIButton) {
var utterance = AVSpeechUtterance(string:"This is a test")
voice.speakUtterance(utterance)
}
}
Speech Recognition (Speech-to-Text aka STT) Check the following in your system settings: Look under 'Language & Input'. In some cases it might be under Gboard. Find "Google Voice Typing", make sure it's enabled.
Here are some things to check first if voice typing isn't working: Make sure the microphone you want to use is selected in Settings. To check, select Start > Settings > System > Sound > Input > Choose a device for speaking or recording.
Press Windows key + Ctrl + Enter, and Narrator starts reading the text on the page to you. Stop Narrator from speaking by pressing the same shortcut.
The iOS 8 simulators do not support text-to-speech. However, the iOS 7 simulators do still support text-to-speech (at least as of Xcode 6.1), so if your app works under iOS 7 you can test it on your desktop.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With