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
  • 22,394
  • 11
  • 96
  • 107
1

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

Community
  • 1
  • 1
Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
0

Now, since ios7 you can use the built in AVSpeechSynthesizer

AlexWien
  • 28,470
  • 6
  • 53
  • 83