Hi,
First of all, thanks you for the effort porting Librosa to Java. I think that could be very useful.
I have tested the library in windows 10 and i found that when converting to mono audio, the library fails because of the method used to round the result of the mean between audio channels.
Error in:
meanBuffer[q] = Float.parseFloat(df.format(frameVal / mChannels));
Due to decimal format:
DecimalFormat df = new DecimalFormat("#.#####");
Changing the format solves the issue
DecimalFormat df = new DecimalFormat("#,#####");
It seems that the format is related to platform or platform config(assuming you don't have such an error). I don't know why to use this type of rounding that don't take advantage of float and double precision. Why not just casting to float?
Hi, First of all, thanks you for the effort porting Librosa to Java. I think that could be very useful.
I have tested the library in windows 10 and i found that when converting to mono audio, the library fails because of the method used to round the result of the mean between audio channels.
Error in:
meanBuffer[q] = Float.parseFloat(df.format(frameVal / mChannels));
Due to decimal format:DecimalFormat df = new DecimalFormat("#.#####");
Changing the format solves the issue
DecimalFormat df = new DecimalFormat("#,#####");
It seems that the format is related to platform or platform config(assuming you don't have such an error). I don't know why to use this type of rounding that don't take advantage of float and double precision. Why not just casting to float?