google/WaxalNLP
Viewer • Updated • 1.67M • 40.5k • 232
How to use olaolugbenle/african-lid-v2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("audio-classification", model="olaolugbenle/african-lid-v2") # Load model directly
from transformers import AutoProcessor, AutoModelForAudioClassification
processor = AutoProcessor.from_pretrained("olaolugbenle/african-lid-v2")
model = AutoModelForAudioClassification.from_pretrained("olaolugbenle/african-lid-v2")Language identification is the act of classifying what language was spoken from a short segment of audio. To develop this model, I have finetuned the facebook/wav2vec2-xls-r-300m model on the Google WAXAL dataset. It achieves the following results on the evaluation set:
Languages used:
Datasets were balanced as shown in this table below:
| Language | Train | Val | Test |
|---|---|---|---|
| Fulani | 19.2k | 2.21k | 2.49k |
| Shona | 13.1k | 3.28k | 1.18k |
| Lingala | 11.8k | 4.35k | 1.96k |
| Totals | 44.1k | 9.84k | 5.63k |
| Language | Train | Val | Test |
|---|---|---|---|
| Fulani | 11,794 | 2,209 | 1,175 |
| Shona | 11,794 | 2,209 | 1,175 |
| Lingala | 11,794 | 2,209 | 1,175 |
| Totals | 35,382 (77.70%) |
6,627 (14.55%) |
3,525 (7.74%) |
This model was trained on Kaggle. The T4 x2 GPU was used. As per Kaggle docs, the hardware specs are as follows:
T4 x2 GPU Specifications:
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Val Accuracy | Validation Loss |
|---|---|---|---|---|
| 0.0788 | 1.0 | 2212 | 0.9719 | 0.3365 |
| 0.0498 | 2.0 | 4424 | 0.9703 | 0.4363 |
| 0.0470 | 3.0 | 6636 | 0.9712 | 0.3324 |
| 0.0384 | 4.0 | 8848 | 0.9728 | 0.3597 |
| 0.0275 | 5.0 | 11060 | 0.9663 | 0.4080 |
| 0.0244 | 6.0 | 13272 | 0.9709 | 0.4334 |
| 0.0205 | 7.0 | 15484 | 0.9721 | 0.3472 |
| Class / Metric | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| ful | 0.99 | 1.00 | 0.99 | 1175 |
| lin | 0.99 | 0.99 | 0.99 | 1175 |
| sna | 0.99 | 0.99 | 0.99 | 1175 |
| accuracy | 0.99 | 3525 | ||
| macro avg | 0.99 | 0.99 | 0.99 | 3525 |
| weighted avg | 0.99 | 0.99 | 0.99 | 3525 |
Base model
facebook/wav2vec2-xls-r-300m