i have found many libraries like flite which can be be used, as in given here, but I want to know if there is any Built-In class provided by iOS SDK similar to NSSpeechRecognizer provided in OS X.
With Dictation on iPhone, you can dictate text anywhere you can type it. You can also use typing and Dictation together—the keyboard stays open during Dictation so you can easily switch between voice and touch to enter text. For example, you can select text with touch and replace it with your voice.
Hear selected text: Select the text, then tap Speak. Hear the entire screen: Swipe down with two fingers from the top of the screen. Use the controls that appear to pause speaking or adjust the rate.
The speech recognition process involves capturing audio of the user's voice and sending that data to Apple's servers for processing. The audio you capture constitutes sensitive user data, and you must make every effort to protect it.
To make Voice-to-Text work, open the Settings app and go to Screen Time > Content & Privacy Restrictions > Allowed Apps. On the Allowed Apps screen, check if the Siri & Dictation toggle is disabled. If yes, turn on the Siri & Dictation toggle to re-enable Voice-to-Text on your iPhone.
There is no built in text-to-speech support in iOS 5 or 6 - you'll need to use a third party library. If you are using iOS 7 you're in luck.
There's a new class in iOS 7 called AVSpeechSynthesizer
(Apple's docs can be found here). You can use this to perform text-to-speech. Here's a simple example:
AVSpeechUtterance *utterance = [AVSpeechUtterance
speechUtteranceWithString:@"Hello world"];
AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc] init];
[synth speakUtterance:utterance];
Properties such as speed and voice type are set in the AVSpeechUtterance
, rather than the synthesizer.
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