Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVSpeechUterrance speed in iOS 8

I had a code in iOS 7 to use speech synthesis, all went well. To define my AVSpeechUtterance speed rate, I used the following formula

float speakSpeedRate = (AVSpeechUtteranceMinimumSpeechRate + AVSpeechUtteranceDefaultSpeechRate)*0.5;

but it seems, at least on my iPhone 5S, that under iOS 8, AVSpeechUtteranceDefaultSpeechRate is much faster than it was on iOS 7.

Has any one experienced that ?

EDIT : I went through Apple dev forums, it seems others encountered this bug, but it might depend on other parameters, like language...

like image 393
Vinzzz Avatar asked Sep 29 '14 10:09

Vinzzz


3 Answers

Same probleme here. So I handled it by giving a different value. It seems that iOS8 doubles the speed.

if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1)
{
    speechUtterance.rate = 0.15;
}else{
    speechUtterance.rate = 0.3;
}
like image 164
Bin Chen Avatar answered Nov 19 '22 03:11

Bin Chen


Yes. TTS on iOS8 have multiple issues (and, imho, badly broken): it did not work in simulator, it have problems with muted voices, requires settings in accessibility, rate is different then on iOS7, etc. Just search SO for tags "ios8" and "AVSpeechSynthesizer" and discover pack of bugs!

Solution? Just wait for update - and keep posting radars.

Workaround? Measure time to speak known phrase on iOS7 and iOS8, and correct actual rate for iOS8.

upd dec-2014: XCode 6.2 beta2 did resolve issues with TTS in simulator and TTS rate.

like image 20
deksden Avatar answered Nov 19 '22 05:11

deksden


Yes ive noticed this to, ive adjusted my speech Utterance speed to float speechSpeed = 0.1000;

like image 38
JSA986 Avatar answered Nov 19 '22 03:11

JSA986