cwkeam commited on
Commit
3d6ec58
Β·
1 Parent(s): e051532

add model card

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md CHANGED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # M-CTC-T
2
+ ​
3
+ Massively multilingual speech recognizer from Meta AI. The model is a 1B-param transformer encoder, with a CTC head over 8065 character labels and a language identification head over 60 language ID labels. It is trained on Common Voice (version 6.1, December 2020 release) and VoxPopuli. After training on Common Voice and VoxPopuli, the model is trained on Common Voice only. The labels are unnormalized character-level transcripts (punctuation and capitalization are not removed). The model takes as input Mel filterbank features from a 16Khz audio signal.
4
+ ​
5
+ ![model image](https://github.com/cwkeam/scientific-images/blob/main/MCTCT/mctct-arch.png)
6
+ ​
7
+ The original Flashlight code, model checkpoints, and Colab notebook can be found at https://github.com/flashlight/wav2letter/tree/main/recipes/mling_pl .
8
+ ​
9
+ ​
10
+ ## Citation
11
+ ​
12
+ [Paper](https://arxiv.org/abs/2111.00161)
13
+ ​
14
+ Authors: Loren Lugosch, Tatiana Likhomanenko, Gabriel Synnaeve, Ronan Collobert
15
+ ​
16
+ ```
17
+ @article{lugosch2021pseudo,
18
+ title={Pseudo-Labeling for Massively Multilingual Speech Recognition},
19
+ author={Lugosch, Loren and Likhomanenko, Tatiana and Synnaeve, Gabriel and Collobert, Ronan},
20
+ journal={ICASSP},
21
+ year={2022}
22
+ }
23
+ ```
24
+ ​
25
+ Additional thanks to Chan Woo Kim and Patrick von Platen for porting the model from Flashlight to PyTorch.
26
+ ​
27
+ # Training method
28
+ ​
29
+ ![model image](https://github.com/cwkeam/scientific-images/blob/main/MCTCT/mctct-slimipl.png) TO-DO: replace with the training diagram from paper
30
+ ​
31
+ For more information on how the model was trained, please take a look at the [official paper](https://arxiv.org/abs/2111.00161).
32
+ ​
33
+ # Usage
34
+ ​
35
+ To transcribe audio files the model can be used as a standalone acoustic model as follows:
36
+ ​
37
+ ```python
38
+ ​
39
+ import torch
40
+ import torchaudio
41
+ from transformers import MCTCTForCTC, MCTCTProcessor
42
+
43
+ model = MCTCForCTC.from_pretrained("speechbrain/mctc-large")
44
+ processor = MCTCTProcessor.from_pretrained("speechbrain/mctc-large")
45
+
46
+ # load dummy dataset and read soundfiles
47
+ ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
48
+
49
+ # tokenize
50
+ input_features = processor(ds[0]["audio"]["array"], return_tensors="pt", padding="longest").input_features # Batch size 1
51
+
52
+ # retrieve logits
53
+ logits = model(input_features).logits
54
+
55
+ # take argmax and decode
56
+ predicted_ids = torch.argmax(logits, dim=-1)
57
+ transcription = processor.batch_decode(predicted_ids)
58
+ ```
59
+
60
+ Results for Common Voice, averaged over all languages:
61
+ ​
62
+ *Character error rate (CER)*:
63
+ ​
64
+ | Valid | Test |
65
+ |---|---|
66
+ | 21.4 | 23.3 |
67
+ Collapse