Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ enhance_model = SpectralMaskEnhancement.from_hparams(
|
|
11 |
def speechbrain(aud):
|
12 |
# Load and add fake batch dimension
|
13 |
noisy = enhance_model.load_audio(
|
14 |
-
aud
|
15 |
).unsqueeze(0)
|
16 |
enhanced = enhance_model.enhance_batch(noisy, lengths=torch.tensor([1.]))
|
17 |
torchaudio.save('enhanced.wav', enhanced.cpu(), 16000)
|
|
|
11 |
def speechbrain(aud):
|
12 |
# Load and add fake batch dimension
|
13 |
noisy = enhance_model.load_audio(
|
14 |
+
aud
|
15 |
).unsqueeze(0)
|
16 |
enhanced = enhance_model.enhance_batch(noisy, lengths=torch.tensor([1.]))
|
17 |
torchaudio.save('enhanced.wav', enhanced.cpu(), 16000)
|