AVSpeechSynthesizer iOS 8 Issues

≯℡__Kan透↙ 提交于 2019-12-08 02:34:34

问题


Since upgrading to xCode 6 and iOS 8 I've noticed serious issues with AVSpeechSynthesizer. Prior to the upgrade, it worked perfectly, but now, several issues have risen.

  1. Speech Utterances are playing at a much faster rate then how they were prior to upgrade.
  2. When I queue up 2 speech utterances, it simply skips over the first utterance and plays the second one first. (This only occurs on the first run of the speech synthesizer. The second run and on works properly.)

Please, any help would be greatly appreciated. Thanks in advance.


回答1:


For second issue, see this answer for AVSpeechUtterance - Swift - initializing with a phrase.

As for me - iOS 8 also did not support properly languages other than phone language + english.

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




回答2:


It looks to me as though a user can only hear the voice if they have specifically downloaded it in their accessibility settings. What I have not been able to do is work out how to tell which voices they have downloaded.




回答3:


I have discovered a horrible hack to make voices that have not been specifically downloaded play. To do so I had to have two synthesizers running and get one to run through all the voices saying something. Then the other synthesizer could use any of the voices. As I say, this is a horrible hack and I cannot guarantee its reliability. In addition, it may stop working at a future varsion of ios8.

In my own apps I have chosen to make a library and get it to cycle through all the voices. Where they take more than zero time to say a phrase, they are a "good" voice and I offer it to the user. This has the advantage that it is likely to be robust against changes in the ios version.



来源:https://stackoverflow.com/questions/25870545/avspeechsynthesizer-ios-8-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!