如果在设备的辅助功能设置中未启用 SpeakSelection,则将 AVSpeechSynthesizer/AVSpeechUtterance 用于文本到语音转换将不起作用 [英] Using AVSpeechSynthesizer/AVSpeechUtterance for Text-To-Speech will not work if SpeakSelection is not enabled in device's Accessiblity settings
问题描述
我使用 AVSpeechSynthesizer 和 AVSpeechUtterance 进行文本到语音转换.它工作正常,但用户必须在其设备的辅助功能设置中启用 SpeakSelection 功能.有没有办法为他们做,或者至少检查设置并警告他们?
I use AVSpeechSynthesizer and AVSpeechUtterance for text-to-speech. It works fine, but the User must enable SpeakSelection feature in his/her device's accessibility settings. Is there a way to do it for them, or at least check the settings and warn them?
推荐答案
也许你可以试着说点什么,附上代表并测量说话的持续时间.如果说出你的文字的持续时间接近于零,用户应该检查设置/下载语音左右!
Maybe you can try to say something, attach delegate and measure duration of speaking. If duration of speaking out yours text is near zero, user should check settings/download voice or so!
这篇关于如果在设备的辅助功能设置中未启用 SpeakSelection,则将 AVSpeechSynthesizer/AVSpeechUtterance 用于文本到语音转换将不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!