Skip to content

Conversation

@anautsch
Copy link
Collaborator

@anautsch anautsch commented Mar 20, 2023

As pointed out in #1886 it's an out-dated check.

if version.parse(torch.__version__) <= version.parse("1.6.0"):
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,
)
else:
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,
)

I dropped the if branch of the statement.

Note: the then branch adds return_complex=False, to the parameters.

@Adel-Moumen Adel-Moumen self-assigned this Mar 21, 2023
Copy link
Collaborator

@Adel-Moumen Adel-Moumen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Adel-Moumen Adel-Moumen merged commit c18f620 into speechbrain:develop Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants