Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
kuacakuaca committed Mar 12, 2024
1 parent 3ead58f commit 1af10fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion i6_models/primitives/feature_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def forward(self, raw_audio, length) -> Tuple[torch.Tensor, torch.Tensor]:
smoothed = torch.cat([smoothed, (windowed[:, -1] * last_win[None, :])[:, None]], dim=1) # [B, T', W]

# compute amplitude spectrum using torch.fft.rfftn with Rasr specific scaling
fft = torch.fft.rfftn(smoothed, s=self.n_fft) / self.sample_rate # [B, T', F=n_fft//2+1]
fft = torch.fft.rfftn(smoothed, s=self.n_fft) / self.sample_rate # [B, T', F=n_fft//2+1]
amplitude_spectrum = torch.abs(fft) # [B, T', F=n_fft//2+1]

melspec = torch.einsum("...tf,mf->...tm", amplitude_spectrum, self.mel_basis) # [B, T', F'=num_filters]
Expand Down

0 comments on commit 1af10fc

Please sign in to comment.