Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug related to the win_length setting when using torchgating #100

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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