0

I have a project which is to convert a python audio processing application to Android, which means I need to translate the code from python to java.

The python code uses the librosa library to resample audio files (librosa.resample(y, orig_samplerate, target_samplerate, res_type='sinc_fastest')

Is there any package in java I can use to achieve the same result (have to use the sinc_fastest resample type)? I am new to java, please give me some help! Thanks!

jlibrosa in java seems have the similar function as the librosa in python, but I did not find the resample function.

  • The core Java package for audio, which includes format conversion, is `javax.sound.sampled`, with a tutorial for this at https://docs.oracle.com/javase/tutorial/sound/converters.html#114640. But I don't think this package is accessible in Android. However, Android has some pretty excellent tools of its own for audio. I suggest you edit your question to include the `android` or `android-mediaplayer` tag. – Phil Freihofner Dec 28 '21 at 06:41
  • Thank you for your suggestion! I have editted tags. – user14834847 Jan 01 '22 at 18:10

1 Answers1

0

Double-check that the terms of the license are compatible with your use case but perhaps TarsosDSP is what you are looking for

Phoenix
  • 952
  • 2
  • 12