Using iOS7's Text To Speech to Make iOS Speak
iOS
2013-09-30 13:40 (12 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
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.
We look forward to discussing your development needs.