Skip to content

Commit

Permalink
Fixed a bug related to the win_length setting when using torchgating (#…
Browse files Browse the repository at this point in the history
…100)

Fixed a warning using greater than function in stationary torchgating
  • Loading branch information
nuniz authored Dec 11, 2023
1 parent ad53329 commit 0ddc37c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions noisereduce/torchgate/torchgate.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(
n_movemean_nonstationary: int = 20,
prop_decrease: float = 1.0,
n_fft: int = 1024,
win_length: bool = None,
win_length: int = None,
hop_length: int = None,
freq_mask_smooth_hz: float = 500,
time_mask_smooth_ms: float = 50,
Expand Down Expand Up @@ -161,7 +161,7 @@ def _stationary_mask(
noise_thresh = mean_freq_noise + std_freq_noise * self.n_std_thresh_stationary

# create binary mask by thresholding the spectrogram
sig_mask = X_db > noise_thresh.unsqueeze(2)
sig_mask = torch.gt(X_db, noise_thresh.unsqueeze(2))
return sig_mask

@torch.no_grad()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
setup(
name="noisereduce",
packages=find_packages(),
version="3.0.1",
version="3.0.2",
description="Noise reduction using Spectral Gating in Python",
author="Tim Sainburg",
license="MIT",
Expand Down

0 comments on commit 0ddc37c

Please sign in to comment.