Forum Replies Created
-
AuthorPosts
-
geareddevParticipant
I went into OpenEars and modified kBufferLength to match the buffer used by PapaEngine.
//changed from 0.12800
#define kBufferLength 0.005805Both APIs play nicely now, but the speech recognition isn’t functioning all that well. It only detects a word about 20% of the time, and is often wrong. Will playing with any of the other constants improve the speech recognition and return it to its functional state?
geareddevParticipantWhen I add this code:
[[AudioSessionManager sharedAudioSessionManager] setSoundMixing:true];
self.pocketsphinxController.audioSessionMixing = TRUE;It only crashes about 50% of the time. When it doesn’t crash, I get a constant stream of this in the console:
:: Buffer::copyHeaderFrom(ch 2 2, fr 256 2048)
:: Error: An error occured in the CSL nextBuffer method: Can’t reallocate buffers at run-timeBut otherwise both APIs seem to function. I get binaural sounds, and speech detection works. If I can manage to hack this together so that it doesn’t crash at all, that would be great. I have tried modifying constants such as those in AudioConstants.h but the OpenEars logging seems to suggest that my values are being ignored. I have a gut feeling that if I could match up the buffer sizes that I could make these two play nice.
geareddevParticipantAt this point, I don’t even need PapaEngine and OpenEars to work at the same time. I just need my app to not crash when I activate OpenEars after PapaEngine. Unfortunately, PapaEngine is a singleton class, and there’s no real way to turn it off. I’m not sure how it holds onto the audio session, or how to temporarily disable it from the outside.
Everything appears to work up until this point:
[11748:60b] PreferredBufferSize is now on the correct setting of 0.128000.
:: Buffer::copyHeaderFrom(ch 2 2, fr 256 4096)
:: Error: An error occured in the CSL nextBuffer method: Can’t reallocate buffers at run-time[11748:60b] preferredSampleRateCheck is incorrect, we will change it.
It is at this point that the app crashes. The crash occurs inside:
AudioToolbox`AURemoteIO::PerformIOIs there anyway to prevent this crash? I am okay with the two APIs not working simultaneously, but I need to be able to alternate between the two.
-
AuthorPosts