Views
No views yet
segment_001 0.00 2.57 NON_SPEECH
segment_002 2.57 8.20 SPEECH
segment_003 8.20 9.10 NON_SPEECH
segment_004 9.10 10.93 SPEECH
segment_005 10.93 12.00 NON_SPEECH
segment_006 12.00 14.40 SPEECH
segment_007 14.40 15.00 NON_SPEECH
segment_008 15.00 17.70 SPEECH| Release | hyperparams file | Test Precision | Test Recall | Test F-Score | Model link | GPUs |
|---|---|---|---|---|---|---|
| 2021-09-09 | train.yaml | 0.9518 | 0.9437 | 0.9477 | Model | 1xV100 16GB |
pip install speechbrainfrom speechbrain.inference.VAD import VAD
VAD = VAD.from_hparams(source="speechbrain/vad-crdnn-libriparty", savedir="pretrained_models/vad-crdnn-libriparty")
boundaries = VAD.get_speech_segments("speechbrain/vad-crdnn-libriparty/example_vad.wav")
# Print the output
VAD.save_boundaries(boundaries)VAD.save_boundaries(boundaries, save_path='VAD_file.txt')import torchaudio
upsampled_boundaries = VAD.upsample_boundaries(boundaries, 'example_vad.wav')
torchaudio.save('vad_final.wav', upsampled_boundaries.cpu(), 16000) 1from speechbrain.inference.VAD import VAD
2VAD = VAD.from_hparams(source="speechbrain/vad-crdnn-libriparty", savedir="pretrained_models/vad-crdnn-libriparty")
3
4# 1- Let's compute frame-level posteriors first
5audio_file = "example.wav"
6prob_chunks = VAD.get_speech_prob_file(audio_file)
7
8# 2- Let's apply a threshold on top of the posteriors
9prob_th = VAD.apply_threshold(prob_chunks).float()
10
11# 3- Let's now derive the candidate speech segments
12boundaries = VAD.get_boundaries(prob_th)
13
14# 4- Apply energy VAD within each candidate speech segment (optional)
15
16boundaries = VAD.energy_VAD(audio_file,boundaries)
17
18# 5- Merge segments that are too close
19boundaries = VAD.merge_close_segments(boundaries, close_th=0.250)
20
21# 6- Remove segments that are too short
22boundaries = VAD.remove_short_segments(boundaries, len_th=0.250)
23
24# 7- Double-check speech segments (optional).
25boundaries = VAD.double_check_speech_segments(boundaries, audio_file, speech_th=0.5)run_opts={"device":"cuda"} when calling the from_hparams method.git clone https://github.com/speechbrain/speechbrain/cd speechbrain
pip install -r requirements.txt
pip install -e . - LibriParty: https://drive.google.com/file/d/1--cAS5ePojMwNY5fewioXAv9YlYAWzIJ/view?usp=sharing
- Musan: https://www.openslr.org/resources/17/musan.tar.gz
- CommonLanguage: https://zenodo.org/record/5036977/files/CommonLanguage.tar.gz?download=1cd recipes/LibriParty/VAD
python train.py hparams/train.yaml --data_folder=/path/to/LibriParty --musan_folder=/path/to/musan/ --commonlanguage_folder=/path/to/common_voice_kpd1@misc{speechbrain,
2 title={{SpeechBrain}: A General-Purpose Speech Toolkit},
3 author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio},
4 year={2021},
5 eprint={2106.04624},
6 archivePrefix={arXiv},
7 primaryClass={eess.AS},
8 note={arXiv:2106.04624}
9}