Downloads · 30 days
13
28% of all-time downloads
GetmanY1/wav2vec2-base-fi-voxpopuli-v2-sami-parl-ext-ft
wav2vec2-base-fi-voxpopuli-v2-sami-parl-ext-ft is a automatic speech recognition model from GetmanY1. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
facebook/wav2vec2-base-fi-voxpopuli-v2 with two-step, extended fine-tuning. The model was originally adapted to Finnish ASR with 1500 hours of speech from the Lahjoita puhetta (Donate Speech) corpus, followed by addin…
Downloads · 30 days
13
28% of all-time downloads
All-time downloads
47
Public
Parameters
94.4M
378 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors378 MB · 100%
From the Hugging Face model README
facebook/wav2vec2-base-fi-voxpopuli-v2 with two-step, extended fine-tuning. The model was originally adapted to Finnish ASR with 1500 hours of speech from the Lahjoita puhetta (Donate Speech) corpus, followed by adding randomly initialized weights and bias terms in the final linear layer (language modeling head) for the 12 new characters introduced by the target Sámi data and fine-tuning on 20 hours of Sámi Parliament speech data on 16kHz sampled speech audio. When using the model make sure that your speech input is also sampled at 16Khz.
The Sámi Wav2Vec2 Base has the same architecture and uses the same training objective as the English and multilingual one described in Paper.
You can read more about the pre-trained model from this paper. The training scripts are available on GitHub
You can use this model for Sámi ASR (speech-to-text).
To transcribe audio files the model can be used as a standalone acoustic model as follows:
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
from datasets import load_dataset
import torch
# load model and processor
processor = Wav2Vec2Processor.from_pretrained("GetmanY1/wav2vec2-base-fi-voxpopuli-v2-sami-parl-ext-ft")
model = Wav2Vec2ForCTC.from_pretrained("GetmanY1/wav2vec2-base-fi-voxpopuli-v2-sami-parl-ext-ft")
# load dummy dataset and read soundfiles
ds = load_dataset("mozilla-foundation/common_voice_16_1", "fi", split='test')
# tokenize
input_values = processor(ds[0]["audio"]["array"], return_tensors="pt", padding="longest").input_values # Batch size 1
# retrieve logits
logits = model(input_values).logits
# take argmax and decode
predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(predicted_ids)
This model was fine-tuned with audio samples whose maximum length was 30 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.
The model was fine-tuned on the data from the Sámi Parliament speech data so this model might have biases towards formal Sámi.
If you use our models or scripts, please cite our article as:
@inproceedings{getman24b_interspeech,
author={Yaroslav Getman and Tamas Grosz and Katri Hiovain-Asikainen and Mikko Kurimo},
title={{Exploring adaptation techniques of large speech foundation models for low-resource ASR: a case study on Northern Sámi}},
year=2024,
booktitle={Proc. INTERSPEECH 2024},
pages={2539--2543},
doi={10.21437/Interspeech.2024-479},
issn={2958-1796}
}