Skip to content

Is possible to generate same result of pytorch stft #13

Description

@leohuang2013

Thanks for great work. I want to use this library to mimic pytorch STFT, so that given same signal( wav data ), generate same output. I used test.cpp with same wave file: data/male_1.wav. The output is so different( which I think expected, because parameters even different, like window length and shift length).

For pytorch STFT, code and parameters as following
stft = torch.stft(
x,
self.n_fft,
self.hop_length,
self.win_length,
self.window.to(x.device),
self.center,
self.pad_mode,
self.normalized_stft,
self.onesided,
return_complex=False,
)
n_fft = 400
win_length = 400
hop_length = 160
window function: torch.hamming_window
center: True
pad_mode : "constant"
normalized_stft: False
onesided: True

How hard if I want change this library to make it produce same result as pytorch STFT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions