OK, a quick look at the error you’re getting here:
Makes me think that this is happening when you don’t have connectivity to the network device at the exact moment that the audio unit needs to start.
I would recommend going to ContinousAudioUnit.mm’s function:
int32 startRecording(PocketsphinxAudioDevice * audioDevice);
And seeing if you can patch in a test for the airplay connection before this line:
OSStatus startAudioUnitOutputStatus = AudioOutputUnitStart(audioDriver->audioUnit);
which is where the attempt is made to start the audio unit. I don’t have an airplay device so for me to fix it it would have to wait until whatever point in the future I have one.