Edit model card

Colloquial Finnish Wav2vec2-Large ASR

GetmanY1/wav2vec2-large-fi-lp-cont-pt fine-tuned on 1500 hours of Lahjoita puhetta (Donate Speech) on 16kHz sampled speech audio. When using the model make sure that your speech input is also sampled at 16Khz.

Model description

The Finnish Wav2Vec2 Large 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

Intended uses & limitations

You can use this model for Finnish ASR (speech-to-text).

How to use

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-large-fi-lp-cont-pt-1500h")
model = Wav2Vec2ForCTC.from_pretrained("GetmanY1/wav2vec2-large-fi-lp-cont-pt-1500h")

# 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)

Limitations and bias

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.

The model was fine-tuned on the data from the Lahjoita puhetta (Donate Speech) corpus so this model might have biases towards colloquial Finnish.

Citation

If you use our models or scripts, please cite our article as:

@inproceedings{getman24a_interspeech,
  author={Yaroslav Getman and Tamas Grosz and Mikko Kurimo},
  title={{What happens in continued pre-training? Analysis of self-supervised speech
models with continued pre-training for colloquial Finnish ASR}},
  year=2024,
  booktitle={Proc. INTERSPEECH 2024},
  pages={XX--XX},
  doi={XXXX},
  issn={XXXX-XXXX}
}

Team Members

Feel free to contact us for more details 🤗

Downloads last month
6
Safetensors
Model size
315M params
Tensor type
F32
·

Collection including GetmanY1/wav2vec2-large-fi-lp-cont-pt-1500h

Evaluation results