8

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?).

Cœur
  • 37,241
  • 25
  • 195
  • 267
John Wiseman
  • 3,081
  • 1
  • 22
  • 31

2 Answers2

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