Open mike-nelson opened 9 years ago
Sure, you can record audio using native code (the Audio Toolbox framework) and send the samples to the recognizer. There's plenty or resources on Apple's wesite, including sample code: https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html
But if you do native code, I don't see the point of using pocketsphinx.js, just go with pocketsphinx compiled natively.
Thanks for the pointers. I was hoping to be able to do this with an existing plugin, without having to write any objective C. But I think I need to look into writing one.
Good point about pulling the C code in - if I do make an objective C plugin I could probably include the C source in it. Would the C version be significantly more perfomant on a phone do you think?
Do you know if it's possible using Cordova plugins to capture the audio and pass it into the recognizer? Has anyone done this successfully and do you have any pointers?
It seems this could be done by capturing to a file but would that be too slow for real time keyword spotting?