Ideally I would like to use 10.8's/Mountain Lion's dictation feature from Python, without a GUI. As far as I can tell dictation is currently only supported by using the UITextInput protocol, which implies a GUI (correct?).
Asked
Active
Viewed 1,688 times
8

Cœur
- 37,241
- 25
- 195
- 267

John Wiseman
- 3,081
- 1
- 22
- 31
-
Is there any particular reason why you tagged this under python? Are you looking to with it in python? – ciferkey Aug 07 '12 at 18:54
-
Yes, as I said in my question, ideally I would like to use the dictation feature from within Python. – John Wiseman Aug 07 '12 at 20:05
-
Oh my bad I admit to skimming... – ciferkey Aug 07 '12 at 20:06
-
You might also want to follow this related question: http://stackoverflow.com/questions/11702804/how-to-use-dictationservices-framework – Anno2001 Aug 21 '12 at 10:26
-
2I'm pretty sure `UITextInput` is how you use iOS's dictation feature from iOS, and has nothing to do with OS X, so you've been searching in the wrong place. – abarnert Sep 08 '14 at 04:57
-
June 2015 -- Bump! Did you ever get anywhere with this? – P i Jun 19 '15 at 10:44
-
Sorry to say I did not. – John Wiseman Jun 22 '15 at 18:43
2 Answers
2
You can create a dummy text field and programmatically start dictating by emulating the keypress (tried out successfully here)

Anno2001
- 1,343
- 12
- 17
-
@Anno2001 Can you give me a hint how to emulate the "fn" key press twice? – Lars Schneider Apr 01 '13 at 20:18
-
2
0
I think you want the Speech Framework. SFSpeechRecognizer
et al. I don't believe this requires a window session on macOS as this is part of AVFoundation
, though I'm not 100% certain. Try it and see. :-)

Joshua Nozzi
- 60,946
- 14
- 140
- 135