Using iOS7's Text To Speech to Make iOS Speak
iOS
2013-09-30 13:40 (13 years ago)

- Lo-Fi.
- Can also play in Japanese.
- Japanese is slightly distorted.
The AVFoundation framework is required
#import <AVFoundation/AVFoundation.h>AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"The quick brown fox"]; // Language, defaults to iOS settings if omitted utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"]; utterance.rate = 0.2; utterance.volume = 0.8;
AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc] init]; [synth speakUtterance:utterance];
Please rate this article (No signup or login required)
Currently unrated
Related posts
Get the Effective Height and Width of the Browser When the Software Keyboard Appears in iOS Safari and Adjust the Layout
When Duplicate Symbol _OBJC_CLASS_ Appears in Large Numbers During iOS App Build
When Building with Xcode 7, ERROR ITMS-90096: "Your binary is not optimized for iPhone 5 ..." Appears
Struggling to Understand the Relationship Between Frame Size and Viewport Size in UIWebView
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.
We look forward to discussing your development needs.