Skip to content

Commit

Permalink
Update __init__.py (#97)
Browse files Browse the repository at this point in the history
ensure that noisereduce can be loaded without torch
  • Loading branch information
timsainb authored Nov 6, 2023
1 parent 13c9aac commit ad53329
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 ad53329

Please sign in to comment.