Issues with recognition when run simultaneously with video and audio capture.

Home Forums OpenEars plugins Issues with recognition when run simultaneously with video and audio capture.

Topic Resolution: Resolved
Viewing 12 posts - 1 through 12 (of 12 total)

  • Author
    Posts
  • #1025111
    vinoth
    Participant

    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?

    #1025113
    Halle Winkler
    Politepix

    This is due to running video capture simultaneously.

    #1025114
    vinoth
    Participant

    How can i overcome this issue?

    #1025115
    Halle Winkler
    Politepix

    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.

    #1025145
    vinoth
    Participant

    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?

    Note:
    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?

    #1025146
    Halle Winkler
    Politepix

    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.

    #1025148
    vinoth
    Participant

    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.

    Question:
    – 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?

    #1025149
    Halle Winkler
    Politepix

    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.

    #1025220
    vinoth
    Participant

    Halle,

    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?

    #1025222
    Halle Winkler
    Politepix

    Sorry, there is no way of knowing why that would be because Apple doesn’t publish details of those settings.

    #1026629
    warpling
    Participant

    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 AVAudioPlayer begins 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?

    #1026631
    Halle Winkler
    Politepix

    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.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.