Downloads · 30 days
33
0% of all-time downloads
Clementapa/wav2vec2-base-960h-phoneme-reco-dutch
wav2vec2-base-960h-phoneme-reco-dutch is a automatic speech recognition model from Clementapa. Use it when you need speech turned into text. It is set up for transformers.
The Wav2vec2 base model facebook/wav2vec2-base-960h fine tuned on phoneme recognition task for the dutch language.
Downloads · 30 days
33
0% of all-time downloads
All-time downloads
12.8K
Public
Repo size
755 MB
Likes
3
Public
Click a slice to open those files.
.bin378 MB · 100%
From the Hugging Face model README
The Wav2vec2 base model facebook/wav2vec2-base-960h fine tuned on phoneme recognition task for the dutch language.
To transcribe in phonemes 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 tokenizer
processor = Wav2Vec2Processor.from_pretrained("Clementapa/wav2vec2-base-960h-phoneme-reco-dutch")
model = Wav2Vec2ForCTC.from_pretrained("Clementapa/wav2vec2-base-960h-phoneme-reco-dutch")
# load dummy dataset and read soundfiles
ds = load_dataset("common_voice", "nl", split="validation")
# 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)