Can I use OS X 10.8's speech recognition/dictation without a GUI?
Asked Answered
V

2

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

Vedic answered 7/8, 2012 at 18:14 Comment(7)
Is there any particular reason why you tagged this under python? Are you looking to with it in python?Zabaglione
Yes, as I said in my question, ideally I would like to use the dictation feature from within Python.Vedic
Oh my bad I admit to skimming...Zabaglione
You might also want to follow this related question: #11703304Rigorism
I'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.Brahmana
June 2015 -- Bump! Did you ever get anywhere with this?Fewer
Sorry to say I did not.Vedic
R
2

You can create a dummy text field and programmatically start dictating by emulating the keypress (tried out successfully here)

Rigorism answered 21/8, 2012 at 12:24 Comment(2)
@Rigorism Can you give me a hint how to emulate the "fn" key press twice?Thulium
CGEventCreateKeyboardEvent(src, 0x3F, true) it is :)Thulium
G
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. :-)

Grey answered 11/3, 2020 at 17:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.