Home › Forums › OpenEars › Issue with AudioSession interruptions › Reply To: Issue with AudioSession interruptions
January 31, 2015 at 6:26 pm
#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.”);
}