Closed giffy1 closed 8 years ago
I got it working - I was not windowing the data correctly.
hi @giffy1
great to know you got it working. Some things to check:
32768.
should do the tricksum(channels)/number_of_channels
.array.astype(aubio.float_type)
to make sure the samples are in the correct formatFor instance:
samples = (numpy.arange(100)/32768.).astype(aubio.float_type)
best, Paul
The pitch detection sample worked perfectly fine on a .wav file. Now I want to detect pitch on 16-bit PCM audio sent from an Android phone. The data arrives in the Python script as an integer array, but aubio is expecting 32-bit floats. I can put it in the right format, i.e. np.float32(data), which stops the exception but gives me nonsense results. How should I approach this? I've looked for ways to convert the data into .wav format but nothing that doesn't involve file IO.
EDIT: Tried the solution at https://github.com/aubio/aubio/issues/36, but this didn't work.