Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVSpeechSynthesizer utterance rate varying in iOS7 & iOS 9

Issue : In iOS 7.x and iOS 8.x this code is working fine, but in iOS 9.x rate of speech is getting slower as compare to rate of speech in iOS 7 & 8.

self.synthesizer = [[AVSpeechSynthesizer alloc] init];

self.synthesizer.delegate = self;

AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:[NSString stringWithFormat:@"Hey %@, please choose places to explore or select excursions to see our custom crafted deals",[defaults objectForKey:@"USERNAME"]]];

utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"];

utterance.rate = 0.10;

[self.synthesizer speakUtterance:utterance]; 
like image 653
Himz Avatar asked Sep 29 '15 18:09

Himz


1 Answers

[utterance setRate: 0.5f]; will do the job

like image 115
Kaisp Avatar answered Sep 27 '22 22:09

Kaisp