Model reference · open weights
wav2vec2-large-uralic-voxpopuli-finnish is an open-weight audio or speech model from Finnish-NLP. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | Finnish-NLP |
|---|---|
| Type | Audio & music |
| Task | Speech→text |
| Runs with | transformers |
| Released | 2022-05-21 |
| Popularity | 1k downloads / month |
| Licence | Open weights |
About
This acoustic model is a fine-tuned version of facebook/wav2vec2-large-uralic-voxpopuli-v2 for Finnish ASR. The model has been fine-tuned with 276.7 hours of Finnish transcribed speech data. Wav2Vec2 was introduced in this paper and first released at this page.
This repository also includes Finnish KenLM language model used in the decoding phase with the acoustic model.
Wav2vec2-large-uralic-voxpopuli-v2 is Facebook AI's pretrained model for uralic language family (Finnish, Estonian, Hungarian) speech. It is pretrained on 42.5k hours of unlabeled Finnish, Estonian and Hungarian speech from VoxPopuli V2 dataset with the wav2vec 2.0 objective.
This model is fine-tuned version of the pretrained model for Finnish ASR.
You can use this model for Finnish ASR (speech-to-text) task.
Check the run-finnish-asr-models.ipynb notebook in this repository for an detailed example on how to use this model.
This model was fine-tuned with audio samples which maximum length was 20 seconds so this model most likely works the best for quite 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.
A vast majority of the data used for fine-tuning was from the Finnish Parliament dataset so this model may not generalize so well to very different domains like common daily spoken Finnish with dialects etc. In addition, audios of the datasets tend to be adult male dominated so this model may not work as well for speeches of children and women, for example.
The Finnish KenLM language model used in the decoding phase has been trained with text data from the audio transcriptions and from a subset of Finnish Wikipedia. Thus, the decoder's language model may not generalize to very different language, for example to spoken daily language with dialects (because especially the Wikipedia contains mostly formal Finnish language). It may be beneficial to train your own KenLM language model for your domain language and use that in the decoding.
This model was fine-tuned with 276.7 hours of Finnish transcribed speech data from following datasets:
| Dataset | Hours | % of total hours |
|---|---|---|
| Common Voice 9.0 Finnish train + evaluation + other splits | 10.80 h | 3.90 % |
| Finnish parliament session 2 | 0.24 h | 0.09 % |
| VoxPopuli Finnish | 21.97 h | 7.94 % |
| CSS10 Finnish | 10.32 h | 3.73 % |
| Aalto Finnish Parliament ASR Corpus | 228.00 h | 82.40 % |
| Finnish Broadcast Corpus | 5.37 h | 1.94 % |
Datasets were filtered to include maximum length of 20 seconds long audio samples.
This model was trained on a Tesla V100 GPU, sponsored by Hugging Face & OVHcloud.
Training script was provided by Hugging Face and it is available here. We only modified its data loading for our custom datasets.
For the KenLM language model training, we followed the blog post tutorial provided by Hugging Face. Training data for the 5-gram KenLM were text transcriptions of the audio training data and 100k random samples of cleaned Finnish Wikipedia (August 2021) dataset.
The following hyperparameters were used during training:
The pretrained facebook/wav2vec2-large-uralic-voxpopuli-v2 model was initialized with following hyperparameters:
| Training Loss | Epoch | Step | Validation Loss | Wer |
|---|---|---|---|---|
| 1.9421 | 0.17 | 500 | 0.8633 | 0.8870 |
| 0.572 | 0.33 | 1000 | 0.1650 | 0.1829 |
| 0.5149 | 0.5 | 1500 | 0.1416 | 0.1711 |
| 0.4884 | 0.66 |
From the published model card. Full card on the HuggingFace links in the sidebar.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Automatic Speech Recognition | Common Voice 9 | Test WER | 4.130 |
| Automatic Speech Recognition | Common Voice 9 | Test CER | 0.920 |
| Automatic Speech Recognition | FLEURS ASR | Test WER | 12.440 |
| Automatic Speech Recognition | FLEURS ASR | Test CER | 5.770 |
Using it via the API
Once AxForge deploys wav2vec2-large-uralic-voxpopuli-finnish for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (wav2vec2-large-uralic-voxpopuli-finnish below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $AXFORGE_API_KEY" \ -F model="wav2vec2-large-uralic-voxpopuli-finnish" -F file=@audio.mp3
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.