Passing audio through to AVCaptureSession

Home Forums OpenEars Passing audio through to AVCaptureSession

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

  • Author
    Posts
  • #1019220
    uzziel
    Participant

    Hello,

    I’ve been using OpenEars in my camera app and it’s working beautifully. Thanks for all the work you’ve put in to it. I recently added video recording to the app and the videos that I’m creating have no audio in them. I think that OpenEars is holding on to the mic. Is there a way to pass the audio through to an AVCaptureSession so that I can both run the speech recognition system and get the audio in to a video file?

    #1019221
    Halle Winkler
    Politepix

    Welcome,

    This is unlikely to work, because PocketsphinxController has very specific audio session requirements which won’t have much in common with that of AVCaptureSession, and if PocketsphinxController isn’t overriding the mic that AVCaptureSession needs it is likely to be the opposite case in which AVCaptureSession is overriding the mic that PocketsphinxController needs, and or the mic being available to both but with the wrong characteristics (for instance, sample rate, mono v stereo, etc). But, you can give it a try by setting PocketsphinxController’s audioSessionMixing to TRUE and see if that helps.

    #1019225
    uzziel
    Participant

    Thanks Halle,

    I’ve upgraded the framework and tried this out. So far, no luck.

    Are you not using the AVFoundation framework to handle the audio input within the framework? I was hoping this was the case, because I believe you can use AVCaptureInput objects to do things like waveform analysis of an audio stream and still pass it through to output like a video file.

    SaveThatWave might do what I want if I can’t figure out another approach.

    #1019231
    Halle Winkler
    Politepix

    Sorry, the recording driver uses audio units rather than any prewrapped AVFoundation objects. But AVFoundation is already linked to your project because FliteController uses it, so it’s easy to experiment with if you have ideas about how to accomplish your goal. There are some AVFoundation objects that are less session-overwhelming than others (for instance, AVFoundation itself is linked to FliteController because AVAudioPlayer coexists with PocketsphinxController’s driver effortlessly as long as no calls to the session are made when setting up the player).

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