Speech recognition

Okay. Maybe i was in the wrong section. So here again my question.
Anybody has a really working example of Speechrecognition in XoJo or is it not possible? Without any additional commercial plugIns. It will be a lot of work for me to rewrite my App using Xcode.
Thanks for some reaction.

What did you try? What didn’t work? Why can’t you use a plugin?

Hi Beatrix,
long ago you helped me with some other stuff. I am still using it and thank you once more.
For my new problem i tried some suggestions posted in this under Speech Recognition on Mac / NSSpeechRecognizer .
But none of them worked or could be compiled. I am on Sierra and Xcode 8. Maybe the main problem.

The search functionality of this forum is so bad…

Anyways. I found a mention that Jason King has posted some code for NSSpeechRecognition here. Is this the one that you tried? What errors do you get? It’s likely that the code for old Xojo version needs to be updated, which shouldn’t be too complicated. If the declares need to be updated you may want to contact Jason.

I’ll see if I can take a look at the project I posted before. I doubt it’s broken completely I think it’s just that it uses an old version of macoslib which is no longer compatible.

Yup. That is exactly what i tried just to get 77 Errors. Jason, it would be fantastic if you could just have look at it. I am using 2015 Release 3 on Sierra.

Try this. Took me about 5 minutes to update it using my Foundation module from iOSKit.

Okay. Compiled without error on Release 3.1. Seems to work.I’ll try it tomorrow a bit more. Thanks for your help. What were the main errors?

“Hello” is the only command that is recognized. “good bye”, “see you later” are ignored

Are you running the app on a German system? Try changing the sentence to “si yu lter” - that worked for me without problem :wink:

Thanks for the tip. It works.

Did you try?


Well Christian i read your message yesterday and wanted to give the PlugIn a try. Jasons code was running perfect yesterday, but after starting the Mac this morning, NSspeechrecognizer had stopped working. I did not get it to work after hours. Is NSspeech not reliable or is there anything wrong with Sierra? So first of all i’ll have to check this out.

Did you get any error messages?
e.g. on Console.app?

No Errors. I got it again. I had to switch dictation on and off for several times. Then it started working. When it stopped working i had to repeat the procedure. This cannot be a long time solution?

That’s weird, it worked fine for me, but I also haven’t “upgraded” to Sierra so that may be why. Did you try compiling to 64bit to see if that works? Maybe it’s a problem with the built in libraries on 32bit?

I compiled to 64bit. But same result. But not at every Startup. I’ll watch it.
Jason do you know a way to recognize numbers instead of writing them in the SetCommands array (such as 1 to 180)

There is a function posted here on the forum to convert an integer into a string representation of it. Maybe you can do that and append all of the strings for numbers 1-180 in a for loop?

That would mean that i have to fill my command array with 181 Strings just for numbers from 0 to 180. Is it not possible just to write out the received Data and then convert it.

Unfortunately not. If you want to do that then you could add a whole dictionary of words (like words.txt included in OSX for spellcheck) although this is not intended behavior for this class and it might have some performance affects since its trying to listen to every word in the English language. Is it possible to have a smaller subset? If not you might want to request that the users install a speech recognition software (or include it in your price and give them that too) which pipes the text spoken into a textfield for your app to use.