I was able to solve the problem of Siri/Voice Control breaking OpenEars after the user holds the home button on iOS7 with the following code. Do you think this is the correct technique?
Thanks,
Ben
– (PocketsphinxController *)pocketsphinxController {
if (pocketsphinxController == nil) {
pocketsphinxController = [[PocketsphinxController alloc] init];
pocketsphinxController.returnNbest = TRUE;
pocketsphinxController.nBestNumber = 2;
pocketsphinxController.audioSessionMixing = true; // Allow audio interuptions
}
return pocketsphinxController;
}
// User started Voice Control / Siri
– (void) audioSessionInterruptionDidBegin
{
[pocketsphinxController suspendRecognition];
[pocketsphinxController stopListening];
pocketsphinxController = nil;
}
– (void) audioSessionInterruptionDidEnd
{
[self setupOpenEars]; // Restart Open Ears after the Interruption Ends
}