STFT in Java without zero-padding

24 Views Asked by At

I've been working on porting code from Python to Java to make a mobile implementation of a Python app. The Python app takes in audio data and extracts features from it through Fourier transformations. It makes use of signal.stft which allows for the input signal to not be zero-padded if the user so chooses. To ensure similar results between the python app and the mobile app, I have to be able to create window frames of 800. However, while porting this code to Java, I've been unable to find a library or implement a Fourier transform myself that allows for an arbitrary frame length. The JDSP library requires that frame lengths above 200 to be zero-padded to the nearest power of two--probably because of it's use of the FastFourierTransform library (when I tried to implement my own STFT with this library, it would crash if my window length was not a power of two). Is there a way to implement STFT in Java that allows for arbitrary frame lengths, like Scipy does? Are there any libraries which already allow this?

0

There are 0 best solutions below