Problems with Audio Session

Home Forums OpenEars Problems with Audio Session

Viewing 13 posts - 1 through 13 (of 13 total)

  • Author
    Posts
  • #10009
    Elsa
    Participant

    I’m using Open Ears as a static library as I’m creating an iPad app with the AIR framework.
    It was working fine until I tried to update Open Ears from 0.9 to 1.01. With that version I have problems with, I guess, the AudioSessionManager: when open ears is starting, all sounds from my main application are muted. I tried the soundMixing option, but it didn’t change anything (the recognition loop is always active through the app)
    Do you know what could be the reason of such a difference between these two versions ? Do you have an idea on how to solve it ?
    Thank you for your help,

    #10010
    Halle Winkler
    Politepix
    #10011
    Elsa
    Participant

    Yes I strictly followed these instructions. Open Ears is working perfectly well in both situations, it’s just on the AIR app side that sounds are muted with the 1.01 version.

    #10012
    Halle Winkler
    Politepix

    Hmm, just to rule out any of the early bugs, can you upgrade to 1.1? I don’t really think that is your issue but it would be a good first step to set the level. Also it has nice new features, one of which is easier logging which might show us if there are any errors in the audio session manager.

    #10014
    Elsa
    Participant

    Ok, I just upgraded to 1.1. Still the same issue. Here is the log : http://dl.dropbox.com/u/14292529/log.txt

    #10018
    Halle Winkler
    Politepix

    What kind of sounds are these, sounds you are actively playing or system sounds?

    #10019
    Elsa
    Participant

    Sounds I am actively playing in my main (AIR) app. They are working fine until open ears launches.
    And if it may help, I’m not using Flite, so I don’t need Opean Ears to access to speakers

    #10021
    Halle Winkler
    Politepix

    I’m a bit confused by the description “main app”, are there multiple apps in some sense?

    #10022
    Elsa
    Participant

    Yes, sorry, I may be not very clear. I have an AIR app that launches a native process, in this case, Open Ears.
    After some investigation, I commented every AudioSessionSetProperty in AudioSessionManager, and it’s working fine again (on iOS 5.1)… except on iPad 1 (iOS 4.3.5) : after Open Ears’ launch, sounds continue playing, but Open Ears doesn’t seem to “hear” anything, as when I’m talking, nothing happens.

    #10023
    Halle Winkler
    Politepix

    OK, so that means that the issue is that it used to work because your AIR app was overriding the audio session in some way that it requires after OpenEars first established it, and it had the random luck to not break recognition (or if it had a negative effect on recognition, which is possible, we aren’t directly aware of it) but now that OpenEars does a sanity check for the required settings at every recognition round, the AIR app doesn’t control the audio session setting so it can’t do its audio playback in whatever the form is that it requires.

    You have a fix ,which is to break AudioSessionManager, but this will also probably have negative effects on OpenEars’ performance. However, the previous AIR overriding that was working with the versions before 1.0 most likely also had the same effects so it might not seem like a problem. My random guess about the iPad is that of all your 4.x compatible devices, it may be the only one with only a single mic and whatever the AIR audio session settings are, they may force recognition to occur on a second mic.

    #10025
    Elsa
    Participant

    Yes, apparently it was kAudioSessionProperty_PreferredHardwareIOBufferDuration and kAudioSessionProperty_PreferredHardwareSampleRate that messed with AIR’s audio sessions settings.
    Thank you very much for your quick answers!

    #10447
    jgraham
    Participant

    Hello Elsa. I’m also building something that will use Open Ears with an AIR Native Extension. I am having some trouble though. I am receiving events from my PocketsphinxController instance in ActionScript. For instance, I receive an event when the calibration is complete. So I know Open Ears is up and running and ActionScript is receiving events from it. But as soon as I speak the app closes out. Did you happen to encounter this issue? My guess is it has something to do with the language model. Did you have to do anything special to include the .languagemodel and .dic files when publishing you’re .ipa? I’m using Flash CS6. Any insight would be greatly appreciated!

    #10554
    Elsa
    Participant

    Hi,

    Yes it is surely because Open Ears didn’t find the language model files. In my case, I have all the files needed by Open Ears in my bin folder from where I export my IPA. I’m am using the command line for the export so I don’t really know how it works with Flash but you have to include each file (language model, dictionaries, noise dictionary etc…)
    Also, when debugging on your device, you can open the Organizer in Xcode, there you’ll find the console that will show everything logged from your Open Ears extension. It really helps debugging the extension.

    Tell me if you got it working!

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