Update README.md
Browse files
README.md
CHANGED
@@ -55,13 +55,17 @@ Please notice that we encourage you to read our tutorials and learn more about
|
|
55 |
To use the mimic-loss-trained model for enhancement, use the following simple code:
|
56 |
|
57 |
```python
|
|
|
58 |
from speechbrain.pretrained import SpectralMaskEnhancement
|
59 |
|
60 |
enhance_model = SpectralMaskEnhancement.from_hparams(
|
61 |
source="speechbrain/mtl-mimic-voicebank",
|
62 |
savedir="pretrained_models/mtl-mimic-voicebank",
|
63 |
)
|
64 |
-
enhance_model.enhance_file("/
|
|
|
|
|
|
|
65 |
```
|
66 |
|
67 |
## Referencing Mimic Loss
|
@@ -88,6 +92,6 @@ title = {SpeechBrain},
|
|
88 |
year = {2021},
|
89 |
publisher = {GitHub},
|
90 |
journal = {GitHub repository},
|
91 |
-
howpublished = {
|
92 |
}
|
93 |
```
|
|
|
55 |
To use the mimic-loss-trained model for enhancement, use the following simple code:
|
56 |
|
57 |
```python
|
58 |
+
import torchaudio
|
59 |
from speechbrain.pretrained import SpectralMaskEnhancement
|
60 |
|
61 |
enhance_model = SpectralMaskEnhancement.from_hparams(
|
62 |
source="speechbrain/mtl-mimic-voicebank",
|
63 |
savedir="pretrained_models/mtl-mimic-voicebank",
|
64 |
)
|
65 |
+
enhanced = enhance_model.enhance_file("speechbrain/mtl-mimic-voicebank/example.wav")
|
66 |
+
|
67 |
+
# Saving enhanced signal on disk
|
68 |
+
torchaudio.save('enhanced.wav', enhanced, 16000)
|
69 |
```
|
70 |
|
71 |
## Referencing Mimic Loss
|
|
|
92 |
year = {2021},
|
93 |
publisher = {GitHub},
|
94 |
journal = {GitHub repository},
|
95 |
+
howpublished = {\\url{https://github.com/speechbrain/speechbrain}},
|
96 |
}
|
97 |
```
|