UITextField begin dictation

后端 未结 3 1506
慢半拍i
慢半拍i 2020-12-16 13:23

I\'d like to programmatically put my UITextField input into dictation mode, without requiring the user to bring up and select dictation from the keyboard. Searched the API

相关标签:
3条回答
  • 2020-12-16 13:36

    This is currently not possible on iOS.

    The only place where it is kind of possible is in an app using WatchKit. In WKInterfaceController you can actually use presentTextInputControllerWithSuggestions with nil as parameter which starts dictation input immediately.

    0 讨论(0)
  • 2020-12-16 13:44

    You have to implement SFSpeechRecognizer, use Accelerate framework to get mic sound level floats and make an animated view yourself. It will look cooler!

    Sorry for not providing the code, I think i lost it. Can’t find it on my multiple hard drives :/

    0 讨论(0)
  • 2020-12-16 13:49

    Yes

    With iOS 10 Apple added SFSpeechRecognizer which allows for starting speech recognition without user interaction.

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