Start from librosa 0.10.0, its stft implementation introduced some changes that may break existing testing cases of nnabla.
There seems to be an ongoing discussion on STFT inconsistencies regarding tf.signal.stft, torch.stft, librosa.stft and scipy.signal.stft.
But in this PR, we slightly changed one of our stft test parameter that could workaround the problem.
By the way, nnabla test case passes window_type=rectangular directly to librosa.stft, but according to this document:
_window: string, tuple, number, function, or np.ndarray [shape=(n_fft,)]
Either:
a window specification (string, tuple, or number); see scipy.signal.get_window
a window function, such as scipy.signal.windows.hann
a vector or array of length nfft
Defaults to a raised cosine window (‘hann’), which is adequate for most applications in audio signal processing.
And, refered to scipy document, rectangular should be boxcar, so it's also changed in this PR.
This PR is to resolve stft/istft test failures, skipped by https://github.com/sony/nnabla/pull/1193 .
Start from librosa 0.10.0, its stft implementation introduced some changes that may break existing testing cases of nnabla. There seems to be an ongoing discussion on STFT inconsistencies regarding
tf.signal.stft
,torch.stft
,librosa.stft
andscipy.signal.stft
. But in this PR, we slightly changed one of our stft test parameter that could workaround the problem.By the way, nnabla test case passes
window_type=rectangular
directly tolibrosa.stft
, but according to this document:And, refered to scipy document,
rectangular
should beboxcar
, so it's also changed in this PR.