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?).
Can I use OS X 10.8's speech recognition/dictation without a GUI?
Asked Answered
You can create a dummy text field and programmatically start dictating by emulating the keypress (tried out successfully here)
@Rigorism Can you give me a hint how to emulate the "fn" key press twice? –
Thulium
CGEventCreateKeyboardEvent(src, 0x3F, true)
it is :) –
Thulium 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. :-)
© 2022 - 2024 — McMap. All rights reserved.
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. – Brahmana