我想在朗读文本期间更改语速以了解速度。
我测试了以下两种方式,但语速没有改变。
- (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer willSpeakRangeOfSpeechString:NSRange)characterRange utterance:(AVSpeechUtterance *)utterance{
// 1. AVSpeechUtterance *SpeechUtterence;
SpeechUtterence.rate = fSpeechSpeed;
// 2. set fSpeechSpeed from other view
utterance.rate = fSpeechSpeed;
}