Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
ensure that noisereduce can be loaded without torch
  • Loading branch information
timsainb authored Oct 19, 2023
1 parent 13c9aac commit 33fcfbe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion noisereduce/spectralgate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
from .nonstationary import SpectralGateNonStationary
from .stationary import SpectralGateStationary
from .streamed_torch_gate import StreamedTorchGate
try:
import torch
TORCH_AVAILABLE = True
except ImportError:
TORCH_AVAILABLE = False
if TORCH_AVAILABLE:
from .streamed_torch_gate import StreamedTorchGate

0 comments on commit 33fcfbe

Please sign in to comment.