Hello guys,

I encountered an error while using

"GNOperations.recognizeMIDFileFromPcm(GNSearchResultReady arg0, GNConfig arg1, GNSampleBuffer arg2)"

from the sample app provided in @android sdk.

Error says:

"Not enough audio in input stream.  Need at least 320000 bytes of pcm samples, got 104000 bytes"

The buffer params are the same as mentioned in the sample app

        int channel = 1;
        int sampleRate = 8000;
        int length = (int) (sampleRate * 2 * 6.5);
        byte[] pcmBuffer = new byte[length];


However if I change them to match 320000 bytes, the response I get is not correct it returns some different song info.

am I missing something??




I had a similar problem (albeit with different values as I am using a 44100 sample rate. I am getting a match with every request, but the matches are all wildly incorrect (quite a lot of audio books). Is there anything specific about the PCM Buffer that may not be obvious from the documentation?



For anyone looking at this, my (embarrassing) mistake was using recognizeMIDFileFromPcm rather than recognizeMIDStreamFromPcm.



Forum Discussions