@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