Tuesday 13 May 2014

Text to Speech in iOS7



@import AVFoundation;
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init];
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Hi sajan antony and kiran paul how are you guys !"];
utterance.rate = AVSpeechUtteranceMaximumSpeechRate / 10.0f;
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"]; 
// defaults to your system language
[synthesizer speakUtterance:utterance];

No comments:

Post a Comment