Reply To: Issue with AudioSession interruptions

Home Forums OpenEars Issue with AudioSession interruptions Reply To: Issue with AudioSession interruptions

#1024663
benwirz
Participant

Try stopping you avaudio instances in the pocketsphinxDidStopListening call back. This solved a similar issue for me. -Ben

– (void) pocketsphinxDidStopListening
{
// stop the audio sessions here after pocketspinx has already stopped
if (_speechSynthesizer &&
_speechSynthesizer.speaking)
[_speechSynthesizer stopSpeakingAtBoundary: AVSpeechBoundaryImmediate];
if (_audioPlayerVoiceControlStart &&
_audioPlayerVoiceControlStart.playing)
[_audioPlayerVoiceControlStart stop];

NSLog(@”Pocketsphinx has stopped.”);
}