File size: 9,257 Bytes
820437f
 
 
 
 
 
 
 
 
 
3af8334
820437f
 
 
 
 
 
 
3af8334
 
 
 
820437f
3af8334
 
 
 
820437f
3af8334
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
820437f
 
3af8334
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424a13c
3af8334
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
---
library_name: transformers
language:
- da
license: openrail
base_model: chcaa/xls-r-300m-danish
datasets:
- generator
metrics:
- wer
- cer
model-index:
- name: roest-315m
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: CoRal read-aloud
      type: alexandrainst/coral
      split: test
      args: read_aloud
    metrics:
    - name: CER
      type: cer
      value: 6.9% ± 0.2%
    - name: WER
      type: wer
      value: 14.9% ± 0.4%
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Danish Common Voice 17
      type: mozilla-foundation/common_voice_17_0
      split: test
      args: da
    metrics:
    - name: CER
      type: cer
      value: 5.1% ± 0.6%
    - name: WER
      type: wer
      value: 13.2% ± 0.8%
pipeline_tag: automatic-speech-recognition
---

# Røst-315m

This is a Danish state-of-the-art speech recognition model, trained by [the Alexandra
Institute](https://alexandra.dk/).


## Quick Start
Start by installing the required libraries:

```shell
$ pip install transformers kenlm pyctcdecode
```

Next you can use the model using the `transformers` Python package as follows:

```python
>>> from transformers import pipeline
>>> audio = get_audio()  # 16kHz raw audio array
>>> transcriber = pipeline(model="alexandrainst/roest-315m")
>>> transcriber(audio)
{'text': 'your transcription'}
```


## Evaluation Results

We have evaluated both our and existing models on the CoRal test set as well as the
Danish Common Voice 17 test set. To ensure as robust an evaluation as possible, we have
bootstrapped the results 1000 times and report here the mean scores along with a 95%
confidence interval (lower is better; best scores in **bold**, second-best in
*italics*):

| Model | Number of parameters | [CoRal](https://huggingface.co/datasets/alexandrainst/coral/viewer/read_aloud/test) CER | [CoRal](https://huggingface.co/datasets/alexandrainst/coral/viewer/read_aloud/test) WER | [Danish Common Voice 17](https://huggingface.co/datasets/mozilla-foundation/common_voice_17_0/viewer/da/test) CER | [Danish Common Voice 17](https://huggingface.co/datasets/mozilla-foundation/common_voice_17_0/viewer/da/test) WER |
|:---|---:|---:|---:|---:|---:|
| Røst-315m (this model) | 315M | **6.9% ± 0.2%** | **14.9% ± 0.4%** | *5.1% ± 0.6%* | *13.2% ± 0.8%* |
| [chcaa/xls-r-300m-danish-nst-cv9](https://hf.co/chcaa/xls-r-300m-danish-nst-cv9) | 315M | *14.4% ± 0.3%* | *36.5% ± 0.6%* | **4.1% ± 0.5%** | **12.0% ± 0.8%** |
| [mhenrichsen/hviske](https://hf.co/mhenrichsen/hviske) | 1540M | 15.8% ± 0.7% | *36.5% ± 1.0%* | 5.3% ± 0.4% | 14.5% ± 0.8% |
| [openai/whisper-large-v3](https://hf.co/openai/whisper-large-v3) | 1540M | 16.5% ± 1.3% | 36.8% ± 1.9% | 7.6% ± 0.6% | 18.3% ± 1.1% |
| [openai/whisper-large-v2](https://hf.co/openai/whisper-large-v2) | 1540M | 19.7% ± 1.8% | 42.2% ± 2.6% | 10.6% ± 1.6% | 23.3% ± 2.0% |
| [openai/whisper-large](https://hf.co/openai/whisper-large) | 1540M | 19.5% ± 1.3% | 42.4% ± 1.7% | 12.8% ± 0.8% | 28.3% ± 1.3% |
| [openai/whisper-medium](https://hf.co/openai/whisper-medium) | 764M | 21.5% ± 1.7% | 47.4% ± 2.6% | 13.3% ± 0.8% | 30.0% ± 1.3% |
| [openai/whisper-small](https://hf.co/openai/whisper-small) | 242M | 26.1% ± 1.2% | 57.9% ± 1.5% | 22.9% ± 4.3% | 49.3% ± 6.3% |
| [openai/whisper-base](https://hf.co/openai/whisper-base) | 73M | 50.8% ± 3.6% | 100.1% ± 5.6% | 43.1% ± 5.0% | 85.1% ± 7.9% |
| [openai/whisper-tiny](https://hf.co/openai/whisper-tiny) | 38M | 63.7% ± 3.9% | 120.3% ± 5.7% | 58.5% ± 5.8% | 106.4% ± 8.7% |


### Detailed Evaluation Across Demographics on the CoRal Test Set

| Dialect | CER | WER |
|:---|---:|---:|
| Københavnsk | 2.8% | 6.6% |
| Sjællandsk | 3.9% | 8.6% |
| Fynsk | 7.3% | 15.7% |
| Sønderjysk | 13.3% | 27.1% |
| Vestjysk | 11.1% | 24.9% |
| Østjysk | 3.2% | 7.6% |
| Nordjysk | 2.7% | 5.7% |
| Sydømål | 6.0% | 12.3% |
| Bornholmsk | 9.1% | 19.9% |
| Non-native | 7.3% | 16.7% |

| Gender | CER | WER |
|:---|---:|---:|
| Female | 8.0% | 17.1% |
| Male | 5.8% | 12.8% |

| Age group | CER | WER |
|:---|---:|---:|
| 0-25 | 5.5% | 12.1% |
| 25-50 | 5.9% | 13.3% |
| 50+ | 8.2% | 17.5% |


## Training Data

This model is the result of four different stages of training:

  1. "Pretraining" on 436,000 hours of unlabelled multilingual publicly available data,
     13,628 hours of which is Danish. Pretraining here means that the model learnt to
     "fill in" gaps of raw audio - no transcriptions were used (or available) during
     this process. The pretraining data is distributed as follows:
     - 372,000 hours from [VoxPopuli](https://aclanthology.org/2021.acl-long.80/), being
       speeches from the European Parliament in 23 European languages.
       This includes 13,600 hours of Danish speech.
     - 51,000 hours from [Multilingual
       LibriSpeech](https://doi.org/10.21437/Interspeech.2020-2826), being audiobooks in
       8 European languages. This does not include any Danish speech.
     - 7,000 hours from [Common Voice 6](https://doi.org/10.48550/arXiv.1912.06670),
       being read-aloud speech in 60 diverse languages. This does not include any Danish
       speech.
     - 6,600 hours from [VoxLingua107](https://doi.org/10.1109/SLT48900.2021.9383459),
       being audio from YouTube videos in 107 languages. This includes 28 hours of
       Danish speech.
     - 1,000 hours from [BABEL](https://eprints.whiterose.ac.uk/152840/), being
       conversational telephone speech in 17 African and Asian languages. This does not
       include any Danish speech.
  2. Continued pretraining on 141,000 hours of Danish radio (more specifically, DR P1
     and Radio24Syv from 2005 to 2021).
  3. "Finetuning" on 373 hours of labelled Danish publicly available data. "Finetuning"
     indicates that this stage of training was supervised, i.e. the model was trained on
     both audio and transcriptions to perform the speech-to-text task (also known as
     automatic speech recognition). The finetuning data is as follows:
     - The read-aloud training split of the [CoRal
       dataset](https://huggingface.co/datasets/alexandrainst/coral) (revision
       fb20199b3966d3373e0d3a5ded2c5920c70de99c), consisting of 361 hours of Danish
       read-aloud speech, diverse across dialects, accents, ages and genders.
     - The Danish training split of the [Common Voice 17
       dataset](https://huggingface.co/datasets/mozilla-foundation/common_voice_17_0),
       consisting of 12 hours of Danish read-aloud speech.
  4. An n-gram language model has been trained separately, and is used to guide the
     transcription generation of the finetuned speech recognition model. This n-gram
     language model has been trained on all of the [Danish
     Wikipedia](https://huggingface.co/datasets/alexandrainst/scandi-wiki/viewer/da)
     (approximately 287,000 articles).

The first step was trained by [Babu et al.
(2021)](https://doi.org/10.48550/arXiv.2111.09296), second step by [Hansen
(2022)](https://huggingface.co/chcaa/xls-r-300m-danish) and the third and fourth step by
[Nielsen et al. (2024)](https://huggingface.co/alexandrainst/roest-315m).

The final product is then the combination of the finetuned model along with the n-gram
model, and this is what is used when you use the model as mentioned in the Quick Start
section above.


## Intended use cases

This model is intended to be used for Danish automatic speech recognition.

Note that Biometric Identification is not allowed using the CoRal dataset and/or derived
models. For more information, see addition 4 in our
[license](https://huggingface.co/datasets/alexandrainst/roest-315m/blob/main/LICENSE).


## Why the name Røst?

Røst is both the [Danish word for the human
voice](https://ordnet.dk/ddo/ordbog?query=r%C3%B8st) as well as being the name of [one
of the cold-water coral reefs in
Scandinavia](https://da.wikipedia.org/wiki/Koralrev#Koldtvandskoralrev).


## License
The dataset is licensed under a custom license, adapted from OpenRAIL-M, which allows
commercial use with a few restrictions (speech synthesis and biometric identification).
See
[license](https://huggingface.co/datasets/alexandrainst/roest-315m/blob/main/LICENSE).


## Creators and Funders
The CoRal project is funded by the [Danish Innovation
Fund](https://innovationsfonden.dk/) and consists of the following partners:

- [Alexandra Institute](https://alexandra.dk/)
- [University of Copenhagen](https://www.ku.dk/)
- [Agency for Digital Government](https://digst.dk/)
- [Alvenir](https://www.alvenir.ai/)
- [Corti](https://www.corti.ai/)


## Citation

We will submit a research paper soon, but until then, if you use this model in your
research or development, please cite it as follows:

```bibtex
@dataset{coral2024,
  author    = {Dan Saattrup Nielsen, Sif Bernstorff Lehmann, Simon Leminen Madsen, Anders Jess Pedersen, Anna Katrine van Zee, Anders Søgaard and Torben Blach},
  title     = {CoRal: A Diverse Danish ASR Dataset Covering Dialects, Accents, Genders, and Age Groups},
  year      = {2024},
  url       = {https://hf.co/datasets/alexandrainst/coral},
}
```