On Mar 19, 2014, at 8:42 AM, Kyle Sluder wrote:

> On Wed, Mar 19, 2014, at 08:34 AM, Eric E. Dolecki wrote:
>> Hey all,
>> 
>> I am wondering what's the best way to get speech to text into an OS X
>> application. For iOS there is the Nuance SDK which works really well, but
>> now I'm looking to get speech recognition into something on a Mac. I've
>> been looking for hooks into the Mavericks dictation engine, but haven't
>> found anything yet.
> 
> I don't think the Mavericks dictation engine is public.
> 
> The user can double-tap the Fn key to begin dictation. The app must have
> some way of forwarding that key event to the dictation system; you could
> file a Radar asking for that to be made public.

If your custom NSView implements the NSTextInputClient protocol it can be a 
dictation target. firstRectForCharacterRange... is how it determines where to 
put its UI; insertText:... Th is how it sends the text. The rest of the 
protocol must be implemented but is ignored.

As for the key event - intercepting that is something I looked at and then 
abandoned (virtual machines have interesting requirements), especially since 
the user can customize it to a "normal" (cmd-whatever) and you can't tell what 
it is. Even the normal one doesn't go through menu shortcut handling. I've 
filed rdar://12638411 requesting public APIs to get the key combo and a way to 
tell if dictation is on.



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to