GetmanY1 commited on
Commit
bf87676
1 Parent(s): d57c43c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +102 -3
README.md CHANGED
@@ -1,3 +1,102 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language: fi
4
+ tags:
5
+ - automatic-speech-recognition
6
+ - fi
7
+ - finnish
8
+ model-index:
9
+ - name: wav2vec2-large-fi-lp-from-scratch-1500h
10
+ results:
11
+ - task:
12
+ name: Automatic Speech Recognition
13
+ type: automatic-speech-recognition
14
+ dataset:
15
+ name: Lahjoita puhetta (Donate Speech)
16
+ type: lahjoita-puhetta
17
+ args: fi
18
+ metrics:
19
+ - name: Dev WER
20
+ type: wer
21
+ value: 17.54
22
+ - name: Dev CER
23
+ type: cer
24
+ value: 4.59
25
+ - name: Test WER
26
+ type: wer
27
+ value: 19.26
28
+ - name: Test CER
29
+ type: cer
30
+ value: 5.58
31
+ ---
32
+ # Colloquial Finnish Wav2vec2-Large ASR
33
+
34
+ [GetmanY1/wav2vec2-large-fi-lp-from-scratch](https://huggingface.co/GetmanY1/wav2vec2-large-fi-lp-from-scratch) fine-tuned on 1500 hours of [Lahjoita puhetta (Donate Speech)](https://link.springer.com/article/10.1007/s10579-022-09606-3) on 16kHz sampled speech audio. When using the model make sure that your speech input is also sampled at 16Khz.
35
+
36
+
37
+ ## Model description
38
+
39
+ The Finnish Wav2Vec2 Large has the same architecture and uses the same training objective as the English and multilingual one described in [Paper](https://arxiv.org/abs/2006.11477). It is pre-trained on 2600 hours of unlabeled colloquial Finnish speech from [Lahjoita puhetta (Donate Speech)](https://link.springer.com/article/10.1007/s10579-022-09606-3).
40
+
41
+ You can read more about the pre-trained model from [this paper](TODO). The training scripts are available on [GitHub](https://github.com/aalto-speech/colloquial-Finnish-wav2vec2)
42
+
43
+ ## Intended uses & limitations
44
+
45
+ You can use this model for Finnish ASR (speech-to-text).
46
+
47
+ ### How to use
48
+
49
+ To transcribe audio files the model can be used as a standalone acoustic model as follows:
50
+
51
+ ```
52
+ from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
53
+ from datasets import load_dataset
54
+ import torch
55
+
56
+ # load model and processor
57
+ processor = Wav2Vec2Processor.from_pretrained("GetmanY1/wav2vec2-large-fi-lp-from-scratch-1500h")
58
+ model = Wav2Vec2ForCTC.from_pretrained("GetmanY1/wav2vec2-large-fi-lp-from-scratch-1500h")
59
+
60
+ # load dummy dataset and read soundfiles
61
+ ds = load_dataset("mozilla-foundation/common_voice_16_1", "fi", split='test')
62
+
63
+ # tokenize
64
+ input_values = processor(ds[0]["audio"]["array"], return_tensors="pt", padding="longest").input_values # Batch size 1
65
+
66
+ # retrieve logits
67
+ logits = model(input_values).logits
68
+
69
+ # take argmax and decode
70
+ predicted_ids = torch.argmax(logits, dim=-1)
71
+ transcription = processor.batch_decode(predicted_ids)
72
+ ```
73
+
74
+ ### Limitations and bias
75
+
76
+ This model was fine-tuned with audio samples whose maximum length was 50 seconds so this model most likely works the best for short audios of similar length. However, you can try this model with a lot longer audios too and see how it works. If you encounter out of memory errors with very long audio files you can use the audio chunking method introduced in [this blog post](https://huggingface.co/blog/asr-chunking).
77
+
78
+ The model was fine-tuned on the data from the [Lahjoita puhetta (Donate Speech) corpus](https://link.springer.com/article/10.1007/s10579-022-09606-3) so this model might have biases towards colloquial Finnish.
79
+
80
+ ## Citation
81
+
82
+ If you use our models or scripts, please cite our article as:
83
+
84
+ ```bibtex
85
+ @inproceedings{getman24a_interspeech,
86
+ author={Yaroslav Getman and Tamas Grosz and Mikko Kurimo},
87
+ title={{What happens in continued pre-training? Analysis of self-supervised speech
88
+ models with continued pre-training for colloquial Finnish ASR}},
89
+ year=2024,
90
+ booktitle={Proc. INTERSPEECH 2024},
91
+ pages={XX--XX},
92
+ doi={XXXX},
93
+ issn={XXXX-XXXX}
94
+ }
95
+ ```
96
+
97
+ ## Team Members
98
+
99
+ - Yaroslav Getman, [Hugging Face profile](https://huggingface.co/GetmanY1), [LinkedIn profile](https://www.linkedin.com/in/yaroslav-getman/)
100
+ - Tamas Grosz, [Hugging Face profile](https://huggingface.co/Grosy), [LinkedIn profile](https://www.linkedin.com/in/tam%C3%A1s-gr%C3%B3sz-950a049a/)
101
+
102
+ Feel free to contact us for more details 🤗