pplantinga commited on
Commit
85e2e23
1 Parent(s): 93348e5

Add Pretrained example

Browse files
Files changed (1) hide show
  1. README.md +15 -1
README.md CHANGED
@@ -50,6 +50,20 @@ pip install speechbrain
50
  Please notice that we encourage you to read our tutorials and learn more about
51
  [SpeechBrain](https://speechbrain.github.io).
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  ## Referencing Mimic Loss
54
 
55
  If you find mimic loss useful, please cite:
@@ -76,4 +90,4 @@ publisher = {GitHub},
76
  journal = {GitHub repository},
77
  howpublished = {\url{https://github.com/speechbrain/speechbrain}},
78
  }
79
- ```
 
50
  Please notice that we encourage you to read our tutorials and learn more about
51
  [SpeechBrain](https://speechbrain.github.io).
52
 
53
+ ## Pretrained Usage
54
+
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("/path/to/file.wav")
65
+ ```
66
+
67
  ## Referencing Mimic Loss
68
 
69
  If you find mimic loss useful, please cite:
 
90
  journal = {GitHub repository},
91
  howpublished = {\url{https://github.com/speechbrain/speechbrain}},
92
  }
93
+ ```