Speech Recognition and System Sound


I have a similar requirement as described here:-

What I’d like to do is each time a number is recognized by the speech recognition plug-in play a short system sound so that the end-user knows what they said has a database match, like an audible confirmation and then a corresponding error tone when a match isn’t found. I tried doing this with 2 different audio plug-ins but no sound was played and an error was thrown with one saying unable to start new AV session or something like that.

The Speech Recognition plugin I’m using is this one:-

Does anyone know if this is even possible or how I might achieve this functionality?


I’m not sure it helps, but I have an app that captures speech (with this plugin), plays it back (with the text2speech plugin), and plays a local mp3 file (with nativescript-audio). check this out: https://www.youtube.com/watch?v=IBTcogYuqyU&feature=youtu.be&t=2h18m10s, and here’s the source: https://github.com/EddyVerbruggen/nativescript-pluginshowcase/tree/master/app/speech


Hi Eddy,

it seems your demo crashes just as often as the app I’m attempting to build with your plug-in :slight_smile:

Here’s a list of the various errors I’ve been getting:-

The operation couldn\M-b\M^@\M^Yt be completed. (kAFAssistantErrorDomain error 209.)

The operation couldn\M-b\M^@\M^Yt be completed. (com.apple.coreaudio.avfaudio error -10851.)

921: failed: -10851 (enable 1, outf< 2 ch, 0 Hz, Float32, non-inter> inf< 1 ch, 44100 Hz, Float32>)
AVAEInternal.h:70:_AVAE_Check: required condition is false: [AVAudioIONodeImpl.mm:896:SetOutputFormat: (IsFormatSampleRateAndChannelCountValid(hwFormat))]

Error Domain=kAFAssistantErrorDomain Code=203 “Retry” UserInfo={NSLocalizedDescription=Retry, NSUnderlyingError=0x1c0244530 {Error Domain=SiriSpeechErrorDomain Code=1 “(null)”}}

AVAEInternal.h:70:_AVAE_Check: required condition is false: [AVAEGraphNode.mm:804:CreateRecordingTap: (nullptr == Tap())]

I’ve attempted to fix these errors in your plug-in but had no joy so far, it seems native devs are also experiencing the same errors with no real solutions, here’s a few examples:-


makes me think the Speech API isn’t quite ready for prime-time yet!