speechbrainteam
commited on
Commit
•
edc9f92
1
Parent(s):
f475678
Update README.md
Browse files
README.md
CHANGED
@@ -92,13 +92,14 @@ Sometimes it is useful to jointly visualize the VAD output with the input signal
|
|
92 |
To do it:
|
93 |
|
94 |
```python
|
95 |
-
|
96 |
-
|
|
|
97 |
```
|
98 |
|
99 |
This creates a "VAD signal" with the same dimensionality as the original signal.
|
100 |
|
101 |
-
You can now open *vad_final.wav* and *
|
102 |
|
103 |
|
104 |
### VAD pipeline details
|
@@ -117,6 +118,7 @@ We designed the VAD such that you can have access to all of these steps (this mi
|
|
117 |
```python
|
118 |
|
119 |
# 1- Let's compute frame-level posteriors first
|
|
|
120 |
prob_chunks = VAD.get_speech_prob_file(audio_file)
|
121 |
|
122 |
# 2- Let's apply a threshold on top of the posteriors
|
|
|
92 |
To do it:
|
93 |
|
94 |
```python
|
95 |
+
import torchaudio
|
96 |
+
upsampled_boundaries = VAD.upsample_boundaries(boundaries, 'pretrained_model_checkpoints/example_vad.wav')
|
97 |
+
torchaudio.save('vad_final.wav', upsampled_boundaries.cpu(), 16000)
|
98 |
```
|
99 |
|
100 |
This creates a "VAD signal" with the same dimensionality as the original signal.
|
101 |
|
102 |
+
You can now open *vad_final.wav* and *pretrained_model_checkpoints/example_vad.wav* with software like audacity to visualize them jointly.
|
103 |
|
104 |
|
105 |
### VAD pipeline details
|
|
|
118 |
```python
|
119 |
|
120 |
# 1- Let's compute frame-level posteriors first
|
121 |
+
audio_file = 'pretrained_model_checkpoints/example_vad.wav'
|
122 |
prob_chunks = VAD.get_speech_prob_file(audio_file)
|
123 |
|
124 |
# 2- Let's apply a threshold on top of the posteriors
|