AVSpeechSynthesizer works on simulator but not on device

前端 未结 2 1608
花落未央
花落未央 2021-01-18 17:01

I\'ve been trying to learn AVSpeechSynthesis. The code works fine in the iOS Simulator (both on iPad and iOS) but the text to speech feature doesn\'t work at all on my iPad.

相关标签:
2条回答
  • 2021-01-18 18:01

    Do you have the phone in silent mode? That silences the synthesizer as well.

    0 讨论(0)
  • 2021-01-18 18:05

    It's not working because of the Mute mode of your phone. To turn 'Mute On' in iOS 7, you have to follow the following steps:

    • Go to your Setting option
    • Go to Accessibility
    • Go to AssistiveTouch
    • Turn on AssistiveTouch option from the switch button
    • Then a Moving Assistive icon, will appear on you device screen.
    • Touch on it to expand with more options
    • From there select Device and Touch Un mute option.

    Now run the project and hope it will work.

    P.S: (In iOS 8.0 this code wouldn't work, because for an unexpected bug, from iOS8.1 they remove it and it is now working perfectly) Hope it works. :)

    0 讨论(0)
提交回复
热议问题