I have a bit of a complicated use case, but I’m hoping there’s a simple solution. I’m using OpenEars as a Cordova plugin to perform speech recognition while recording to a file. That much works beautifully.
After the recording, I stop recognition and move to a new view where I load the recorded file to play back. This is happening in a WebView, so I’m using a webkitAudioContext. As soon as the audio context is created, a horrible, and very loud, buzzing takes over the speakers. If I don’t initialize any of the OpenEars stuff, there is no buzzing.
I’ve looked through the forums and understand that there are issues with the audio unit and the PlayAndRecord AudioSession. However, I’m in a view where I don’t need OpenEars any more and I don’t think there are any recognition threads even running. I can’t figure out what is causing the problem though. Any insight into how I might go about cleaning things up or finding a workaround would be greatly appreciated (although I do not have a choice regarding playing the file back via a wekitAudioContext).