UITextField begin dictation
Asked Answered
C

3

20

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 documentation but can find no solution. Any ideas?

Chondro answered 6/7, 2013 at 13:22 Comment(3)
I wonder if it is possible to simulate the pressing of the dictation button upon load.Fortune
did you find the solution ? I need same thing ...Thrifty
I'm looking for this too. Or at least being able to make my own giant button.Exhibitioner
T
6

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.

Turgite answered 27/2, 2015 at 10:13 Comment(2)
Have you found any new solution to do it on iOS?Whitsuntide
@Whitsuntide no, unfortunately there's (still) no way to do this on iOSTurgite
M
0

Yes

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

Merlon answered 15/3, 2018 at 13:19 Comment(1)
Doesn't answer the question. The user wants to know if its possible to open the keyboard itself in dictation mode replicating the behaviour of the mic press with animation and all.Garibald
C
0

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 :/

Charmainecharmane answered 15/8, 2019 at 19:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.