3

Is it possible to access the speech synthesis feature of the iOS that is used for accessibility?

Anne Nonimus
  • 139
  • 3
  • 6
  • possible duplicate of [Text to speech on iPhone](http://stackoverflow.com/questions/416064/text-to-speech-on-iphone) – progrmr Sep 01 '10 at 23:25

3 Answers3

6

Here is an example using AVSpeechSynthesizer on iOS 7:

AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc]init];
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Hey Guys"];
[synthesizer speakUtterance:utterance];

To change the voice use:

utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"de-DE"];

To get a list of all voices:

NSLog(@"voices %@", [AVSpeechSynthesisVoice speechVoices]);
Klaas
  • 21,713
  • 10
  • 91
  • 102
1

May be you can find this SO question helpful. FLITE also brings speech synthesis to iOS.

Community
  • 1
  • 1
Pablo Santa Cruz
  • 170,119
  • 31
  • 233
  • 283
0

Now, since ios7 you can use the built in AVSpeechSynthesizer

AlexWien
  • 27,900
  • 6
  • 50
  • 80