Tagged: interruptions, OpenEars, Rejecto
- This topic has 6 replies, 3 voices, and was last updated 9 years, 2 months ago by benwirz.
-
AuthorPosts
-
January 29, 2015 at 3:24 pm #1024624cocoapriestParticipant
I have a problem with call interruptions while OEPocketsphinxController is listening. What I get is:
[AVAudioSession Notify Thread] AVAudioSessionPortImpl.mm:52: ValidateRequiredFields: Unknown selected data source for Port iPhone Microphone (type: MicrophoneBuiltIn)
Even if I stop listening in the
audioSessionInterruptionDidBegin
, I still get this error. But the main problem is that I can’t re-start listening afteraudioSessionInterruptionDidEnd
:2015-01-29 15:16:29.729 b[1263:564436] re-starting speech engine 2015-01-29 15:16:29.918 b[1263:564740] Error: couldn't set session active.: '!pri' 2015-01-29 15:16:30.690 b[1263:564436] Local callback: AudioSession interruption ended. 2015-01-29 15:16:30.924 b[1263:564436] A request has been made to start a listening session using startListeningWithLanguageModelAtPath:dictionaryAtPath:acousticModelAtPath:languageModelIsJSGF:, however, there is already a listening session in progress which has not been stopped. Please stop this listening session first with [[OEPocketsphinxController sharedInstance] stopListening]; and wait to receive the OEEventsObserver callback pocketsphinxDidStopListening before starting a new session. You can still change models in the existing session by using OEPocketsphinxController's method changeLanguageModelToFile:withDictionary:
Any ideas?
January 29, 2015 at 3:33 pm #1024625Halle WinklerPolitepixHi,
I don’t think that error originates from/due to OpenEars’ audio session management since it doesn’t do anything slightly out of the ordinary with ports or invoke any kind of port validation (?) – it is more likely to be due to something else related to your app architecture. If you are very sure that it is a bug in OpenEars and not due to something else about the app, you can create a replication case using the sample app:
https://www.politepix.com/forums/topic/how-to-create-a-minimal-case-for-replication/
January 29, 2015 at 4:27 pm #1024626cocoapriestParticipantHi,
I just ran the SimpleApp untouched and got the same error:
2015-01-29 16:24:16.763 OpenEarsSampleApp[1299:580806] Local callback: Pocketsphinx has stopped listening. 2015-01-29 16:24:20.466 OpenEarsSampleApp[1299:580849] 16:24:20.466 ERROR: [AVAudioSession Notify Thread] AVAudioSessionPortImpl.mm:52: ValidateRequiredFields: Unknown selected data source for Port iPhone Microphone (type: MicrophoneBuiltIn) 2015-01-29 16:24:28.964 OpenEarsSampleApp[1299:580806] Local callback: AudioSession interruption ended. 2015-01-29 16:24:30.519 OpenEarsSampleApp[1299:580806] Local callback: Pocketsphinx is now listening.
The only difference is that the sample app could re-start listening.
Device: iPhone 5 (Model A1429)
iOS: 8.1.3 (12B466)January 29, 2015 at 4:32 pm #1024627Halle WinklerPolitepixOK, that demonstrates that the error isn’t an obstruction to being able to stop and start in response to an interruption, so you can compare your app and the sample app to see what the difference in the interruption handling is.
January 29, 2015 at 4:36 pm #1024628cocoapriestParticipantyeah, but the error itself doesn’t sound good, right?
January 29, 2015 at 4:45 pm #1024629Halle WinklerPolitepixNo, it sounds like overlogging from deep within the AVAudioSession implementation, even down to referencing a line number inside of a C++ implementation file whose corresponding interface is private. If everything works as defined from OpenEars’ API it would be questionable to troubleshoot an implementation detail we have no access to or documentation about, for qualities (port validation) we’ve never heard of.
January 31, 2015 at 6:26 pm #1024663benwirzParticipantTry 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.”);
} -
AuthorPosts
- You must be logged in to reply to this topic.