maziyarpanahi / jlibrosa

Librosa equivalent Java library to process audio file adn extract features from it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jlibrosa

jLibrosa has been conceptualized to build as an equivalent of Python's librosa library.

Librosa library is widely used to process audio files to generate various values such as magnitude, stft, istft, mfcc etc. These concepts are widely employed in building prediction systems associated with audio form of data.

jLibrosa helps in performing similar kind of processing and to generate the aforementioned features in java.

jLibrosa could be used in Android environment, so Deep Learning models built in Tensorflow and ported to TFLite could be leveraged in Android environment for building mobile apps.

Compiled binaries are available under the directory binaries for your usage.

Available processing features

Python's librosa is a very exhaustive library that supports literally every kind of audio files. jLibrosa is just an beginning version with few people effort. So, we cannot compare librosa's capabilities with jLibrosa's directly. But we would like to work on jLibrosa and make it as comprehensive as Python's librosa in Java/Android world.

As of current version, jLibrosa supports the processing of .wav file only.

With regard to feature extraction, following features are being supported in its current version:

--> Load and read magnitude values of audio file

--> Generate mfcc feature values

--> Generate MelSpectrogram values

--> Generate STFT feature values

--> Generate iSTFT feature values

Pls refer jLibrosaTest.java (under 'src/test/java/com/jlibrosa/audio' directory) files for the more details about how to generate above features from audio files.

Comparison with Python Librosa

Processed values of audio files generated from jLibrosa would be very similar to the respective values from Python librosa files. Refer the JlibrosaTest.java and the corresponding python notebook to compare the values from both the libraries.

While processing audio files for machine learning/deep learning models, it is very much essential that the audio files to be processed in the exact way as with the model has been trained. With jLibrosa, enough care has been taken to ensure that values generated by it is exactly similar to its python counterpart. We have tested the listed processing methods with limited set of audio files - if you come across any differences, please report them for addressing.

About

Librosa equivalent Java library to process audio file adn extract features from it.

License:MIT License


Languages

Language:Java 86.1%Language:Jupyter Notebook 13.9%