anton-l HF staff commited on
Commit
4409545
1 Parent(s): 02da72a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +54 -0
README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ datasets:
5
+ tags:
6
+ - speech
7
+ ---
8
+
9
+ # WavLM-Base-Plus for Speaker Diarization
10
+
11
+ [Microsoft's WavLM](https://github.com/microsoft/unilm/tree/master/wavlm)
12
+
13
+ The model was pretrained on 16kHz sampled speech audio with utterance and speaker contrastive loss. When using the model, make sure that your speech input is also sampled at 16kHz.
14
+
15
+ The model was pre-trained on:
16
+
17
+ - 60,000 hours of [Libri-Light](https://arxiv.org/abs/1912.07875)
18
+ - 10,000 hours of [GigaSpeech](https://arxiv.org/abs/2106.06909)
19
+ - 24,000 hours of [VoxPopuli](https://arxiv.org/abs/2101.00390)
20
+
21
+ [Paper: WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing](https://arxiv.org/abs/2110.13900)
22
+
23
+ Authors: Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, Jian Wu, Long Zhou, Shuo Ren, Yanmin Qian, Yao Qian, Jian Wu, Michael Zeng, Furu Wei
24
+
25
+ **Abstract**
26
+ *Self-supervised learning (SSL) achieves great success in speech recognition, while limited exploration has been attempted for other speech processing tasks. As speech signal contains multi-faceted information including speaker identity, paralinguistics, spoken content, etc., learning universal representations for all speech tasks is challenging. In this paper, we propose a new pre-trained model, WavLM, to solve full-stack downstream speech tasks. WavLM is built based on the HuBERT framework, with an emphasis on both spoken content modeling and speaker identity preservation. We first equip the Transformer structure with gated relative position bias to improve its capability on recognition tasks. For better speaker discrimination, we propose an utterance mixing training strategy, where additional overlapped utterances are created unsupervisely and incorporated during model training. Lastly, we scale up the training dataset from 60k hours to 94k hours. WavLM Large achieves state-of-the-art performance on the SUPERB benchmark, and brings significant improvements for various speech processing tasks on their representative benchmarks.*
27
+
28
+ The original model can be found under https://github.com/microsoft/unilm/tree/master/wavlm.
29
+
30
+ # Fine-tuning details
31
+ The model is fine-tuned on the [LibriMix dataset](https://github.com/JorisCos/LibriMix) using just a linear layer for mapping the network outputs.
32
+
33
+ # Usage
34
+ ## Speaker Diarization
35
+ ```python
36
+ from transformers import Wav2Vec2FeatureExtractor, UniSpeechSatForAudioFrameClassification
37
+ from datasets import load_dataset
38
+ import torch
39
+ dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
40
+ feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained('microsoft/wavlm-base-plus-sd')
41
+ model = UniSpeechSatForAudioFrameClassification.from_pretrained('microsoft/wavlm-base-plus-sd')
42
+ # audio file is decoded on the fly
43
+ inputs = feature_extractor(dataset[0]["audio"]["array"], return_tensors="pt")
44
+ logits = model(**inputs).logits
45
+ probabilities = torch.sigmoid(logits[0])
46
+ # labels is a one-hot array of shape (num_frames, num_speakers)
47
+ labels = (probabilities > 0.5).long()
48
+ ```
49
+
50
+ # License
51
+
52
+ The official license can be found [here](https://github.com/microsoft/UniSpeech/blob/main/LICENSE)
53
+
54
+ ![design](https://raw.githubusercontent.com/patrickvonplaten/scientific_images/master/wavlm.png)