Tagged: Siri
- This topic has 6 replies, 4 voices, and was last updated 8 years, 9 months ago by warpling.
-
AuthorPosts
-
September 29, 2013 at 6:34 pm #1018450zeiteisenParticipant
Hi,
I get the following Log messages:
Pocketsphinx calibration has started.
Pocketsphinx calibration is complete.
Pocketsphinx is now listening.OpenEars resign to work after I hit the Siri button on the keyboard. When Siri is finished with it’s speech to text am I getting this log message:
!!! _NSLayoutTreeGetBaselineOffsetForGlyphAtIndex invalid glyph index 0How can I restart Openears after Siri was active?
September 29, 2013 at 6:45 pm #1018451Halle WinklerPolitepixWelcome,
Siri is by necessity going to override the important audio unit and audio session settings, so there is a good chance this simply isn’t possible as you’ve specified it. But, something you can try is to set pocketsphinxController.audioSessionMixing = TRUE and making sure that you suspend PocketsphinxController before using Siri and resume it afterwards. To the best of my knowledge _NSLayoutTreeGetBaselineOffsetForGlyphAtIndex is a bug in the Siri UITextView object in iOS 7 and isn’t related to OpenEars, which contains no graphics or typographical code.
Take a look at using OpenEarsLogging and verbosePocketsphinx to learn how to turn on OpenEars’ logging functionality so you can see what is actually happening, since the log messages you mentioned look more like the sample app’s NSLog statements.
October 6, 2013 at 2:17 am #1018510benwirzParticipantI 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
}October 6, 2013 at 8:35 am #1018511Halle WinklerPolitepixHi Ben,
Looks right to me.
July 10, 2015 at 11:18 pm #1026362warplingParticipantI’ve been unable to narrow down a similar bug where starting/stopping Siri triggers the proper interrupt begin/end callback, but subsequent starting/stopping of Siri only triggers the interruption begin callback. I’ve seen it happen in the sample app, but it takes some serious button mashing.
I’m on a time crunch so I ended up moving my interrupt functionality to happen via the applicationWillResignActive and applicationDidBecomeActive lifecycle callbacks. Just wanted to leave this here for those stumbling upon the thread looking for a solution, albeit not necessarily the proper one!
July 10, 2015 at 11:25 pm #1026363Halle WinklerPolitepixOK, this may be helpful to a later reader so I’m going to leave it place, but with the proviso that that earlier discussion in this thread is old and can’t be used with OpenEars’ 2.x and later API.
July 10, 2015 at 11:26 pm #1026364warplingParticipantGood addendum. And to clarify: I’m currently using 2.041.
-
AuthorPosts
- You must be logged in to reply to this topic.