March 7, 2015 at 2:51 pm #1025111
In my application, i recorded video using users voice command. Like they say start, stop, etc…I downloaded open ears and integrated into my app. For video recording i used apple AVCam sample. When i start listening, there is no problem. In view will disappear i stopped listening by calling this method [[OEPocketsphinxController sharedInstance] stopListening], some error written in my console log.
Listening teardown wasn’t successful and returned the failure reason: Error: there was a problem tearing down the audio session: Error Domain=NSOSStatusErrorDomain Code=560030580 “The operation couldn’t be completed. (OSStatus error 560030580.)”. Please turn on OELogging in order to troubleshoot this. If you need support with this issue, please turn on both OELogging and verbosePocketsphinx in order to get assistance.
But when i do that again again my app get freeze. can we use apple AVCam and Openers in same view controller? can you give me your thoughts? do you need OELogging?March 7, 2015 at 2:56 pm #1025113
This is due to running video capture simultaneously.March 7, 2015 at 2:58 pm #1025114
How can i overcome this issue?March 7, 2015 at 3:05 pm #1025115
OpenEars is not advised to be run simultaneously with other AV objects that heavily override the audio session settings that it needs to function. It may not be possible. However, two things you can try are to change the order in which you start the two competing objects, and/or to stop the video capture before attempting to stop OEPocketsphinxController. I’m not aware of any audio objects with audio session requirements that can be run simultaneously with other objects that override their required settings, so although this is a common request for OpenEars it unfortunately isn’t really very closely aligned with the way that audio sessions for the iPhone were designed. Therefore, there is limited assistance I can give for issues of audio coexistence, since they don’t originate with this library, but those two suggestions may help.March 12, 2015 at 1:18 pm #1025145
I tried your suggestions and no luck. I modified open ears initialization like below.
Application launch i initialized and started listening and suspended(when speech recognition not needed) and resumed(when speech recognition needed). Is this correct approach? How long open ears listening works? May i need to restart listening some where?
After installed my app in iphone6,at first I could not get the voice commands to work at all. After that I rebooted the entire phone, the voice commands work well. do you meet this sceneario?March 12, 2015 at 1:21 pm #1025146
How long open ears listening works?
OpenEars listening works fine, but as I mentioned, it isn’t specified to work at the same time that you are using a different recording object that takes over its audio session and the microphone it needs to use – that would be an unusual feature. Can you clarify your explanation and your questions? They aren’t yet clear to me, sorry.March 12, 2015 at 1:40 pm #1025148
I integrated open ears in my app, works well. I generated my app .ipa file and given to my friend to install in his device and test the result. My friend installed my app in his phone(iphone6), at first my app speech recognition not works at all(He said “start”,”stop”,etc….)But application could not response his voice command even at low noise. After rebooting his phone it starts working.
– Is there any other possible way to speech recognition gets stopped automatically? (Like other background running apps can able to stop avaudiosession?)
– Or speech recognition getting failed to start?March 12, 2015 at 2:41 pm #1025149
Nope, nothing like that if the app is known to work on your device. You may need to sit with your friend and do some troubleshooting about what is happening during his session in order to isolate what other aspect of the app is interfering with the recognition.March 21, 2015 at 7:22 am #1025220
One quick question, when i set AVCaptureSession Preset value to be AVCaptureSessionPresetPhoto then speech recognition stops working . I don’t know why, its mic going to be idle state? or mic input stops working ?. But when i set preset to AVCaptureSessionPresetHigh speech recognition starts working. This happens on ios7 and ios8 also. Any suggestion?March 21, 2015 at 9:41 am #1025222
Sorry, there is no way of knowing why that would be because Apple doesn’t publish details of those settings.August 19, 2015 at 10:01 pm #1026629warplingParticipant
I’m having a similar issue with my app since it plays little UI sound effects. This is often a time when OpenEars is also beginning to attempt tearing down it’s session, so
AVAudioPlayerbegins trying to play a sound effect while OE tears down and OE gets upset and hiccups when it can’t teardown the audio session.
I was talking a bit with Michael Tyson about the need for AVAudioSession to keep track of how many clients it has! Anyone know someone on Apple’s Audio API team? ;)
Halle, is there a way for me to tell OE not to worry about tearing down the session or something?August 19, 2015 at 10:33 pm #1026631
There isn’t, but have you tried turning mixing off or using the VoiceChat audio mode? VoiceChat would allow you to use system sounds rather than AVAudioPlayer which could help. But most likely this is an expected coexistence issue that there isn’t an integrated fix for. You could try to modify the source to tell it to do less.
- You must be logged in to reply to this topic.