File size: 1,940 Bytes
98f3648 f5c8a98 |
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 |
---
datasets:
- alaleye/aloresb
metrics:
- wer
pipeline_tag: automatic-speech-recognition
---
# Wav2vec2-Bert-Fongbe
This model is a fine-tuned version of [facebook/w2v-bert-2.0](https://arxiv.org/abs/2108.06209). This has a WER of 24.20 on [Aloresb dataset](https://huggingface.co/datasets/alaleye/aloresb), fongbe language.
## Model description
This model is a fine-tuned version of the wav2vec2-BERT architecture on the AlorésB dataset for the Fongbe language. Fongbe, a Gbe language, is predominantly spoken in the southern region of Benin. The model has been fine-tuned specifically for Automatic Speech Recognition (ASR) tasks in this language.
It can be useful for transcription services, research, and linguistic studies involving Fongbe.
### Details
* Model Name: wav2vec2-bert-fongbe
* Base Model: facebook/w2v-bert-2.0
* Fine-tuned on: Aloresb dataset
* Languages: Fongbe
* Architecture: Wav2vec2 + BERT
* Fine-tuning Dataset: Aloresb (Fongbe)
### How to use
```
import torch
import soundfile as sf
from transformers import AutoModelForCTC, Wav2Vec2BertProcessor
model_name = "OctaSpace/wav2vec2-bert-fongbe"
asr_model = AutoModelForCTC.from_pretrained(model_name).to(device)
processor = Wav2Vec2BertProcessor.from_pretrained(model_name)
audio_input, _ = sf.read(file)
inputs = processor([audio_input], sampling_rate=16_000).input_features
features = torch.tensor(inputs)
with torch.no_grad():
logits = asr_model(features).logits
predicted_ids = torch.argmax(logits, dim=-1)
predictions = processor.batch_decode(predicted_ids, skip_special_tokens=True)
```
### Training Procedure
The model was fine-tuned on the Aloresb dataset, which contains audio recordings and transcriptions in Fongbe.
### Training Parameters:
Optimizer: AdamW
Learning Rate: 3e-5
Batch Size: 3
Epochs: 3
Evaluation Results
The model was evaluated using the Word Error Rate (WER) metric on a test set. Here are the results:
WER: 24.20% |