Audio Classification
Transformers
Joblib
Safetensors
English
pronunciation
audio-quality
whisper
speech
Instructions to use jecallora/readai with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jecallora/readai with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("audio-classification", model="jecallora/readai")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jecallora/readai", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Add model card README (#1)
Browse files- Add model card README (e4780aa437242c404ed00812e792d55918383efb)
Co-authored-by: Rj Francisco <rjfrncsc@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -1,3 +1,112 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- audio-classification
|
| 7 |
+
- pronunciation
|
| 8 |
+
- audio-quality
|
| 9 |
+
- whisper
|
| 10 |
+
- speech
|
| 11 |
+
library_name: transformers
|
| 12 |
+
base_model: openai/whisper-base
|
| 13 |
+
pipeline_tag: audio-classification
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
# ReadAI - Pronunciation & Audio Quality Assessment Models
|
| 17 |
+
|
| 18 |
+
This repository contains two models for audio assessment:
|
| 19 |
+
|
| 20 |
+
## 1. Pronunciation Assessment Model (`pronunciation_v3/`)
|
| 21 |
+
|
| 22 |
+
A fine-tuned **WhisperForAudioClassification** model (based on `openai/whisper-base`) for binary pronunciation quality classification.
|
| 23 |
+
|
| 24 |
+
### Labels
|
| 25 |
+
| Label | ID |
|
| 26 |
+
|-------|-----|
|
| 27 |
+
| Bad | 0 |
|
| 28 |
+
| Good | 1 |
|
| 29 |
+
|
| 30 |
+
### Usage
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
from transformers import pipeline
|
| 34 |
+
|
| 35 |
+
classifier = pipeline(
|
| 36 |
+
task="audio-classification",
|
| 37 |
+
model="jecallora/readai",
|
| 38 |
+
subfolder="pronunciation_v3"
|
| 39 |
+
)
|
| 40 |
+
|
| 41 |
+
result = classifier("audio_sample.wav")
|
| 42 |
+
print(result)
|
| 43 |
+
# [{'label': 'Good', 'score': 0.95}, {'label': 'Bad', 'score': 0.05}]
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
### Model Details
|
| 47 |
+
- **Architecture:** WhisperForAudioClassification
|
| 48 |
+
- **Base Model:** openai/whisper-base
|
| 49 |
+
- **Sampling Rate:** 16,000 Hz
|
| 50 |
+
- **Input Format:** Audio (WAV, MP3, etc.)
|
| 51 |
+
- **Framework:** PyTorch (safetensors)
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## 2. Audio Quality Classifier (`audio_quality/`)
|
| 56 |
+
|
| 57 |
+
A scikit-learn classifier for audio quality assessment.
|
| 58 |
+
|
| 59 |
+
### Labels
|
| 60 |
+
| Quality | Score |
|
| 61 |
+
|-----------|-------|
|
| 62 |
+
| Very Good | 100 |
|
| 63 |
+
| Good | 75 |
|
| 64 |
+
| Bad | 50 |
|
| 65 |
+
| Very Bad | 25 |
|
| 66 |
+
|
| 67 |
+
### Files
|
| 68 |
+
- `audio_classifier.joblib` — Trained classifier
|
| 69 |
+
- `scaler.joblib` — StandardScaler for feature normalization
|
| 70 |
+
- `label_encoder.joblib` — Label encoder
|
| 71 |
+
|
| 72 |
+
### Usage
|
| 73 |
+
|
| 74 |
+
```python
|
| 75 |
+
import joblib
|
| 76 |
+
import librosa
|
| 77 |
+
import numpy as np
|
| 78 |
+
|
| 79 |
+
# Load models
|
| 80 |
+
classifier = joblib.load("audio_quality/audio_classifier.joblib")
|
| 81 |
+
scaler = joblib.load("audio_quality/scaler.joblib")
|
| 82 |
+
label_encoder = joblib.load("audio_quality/label_encoder.joblib")
|
| 83 |
+
|
| 84 |
+
# Extract features from audio (16kHz mono)
|
| 85 |
+
y, sr = librosa.load("audio_sample.wav", sr=16000, mono=True)
|
| 86 |
+
|
| 87 |
+
# Your feature extraction pipeline here...
|
| 88 |
+
# features = extract_features(y)
|
| 89 |
+
# scaled = scaler.transform([features])
|
| 90 |
+
# prediction = classifier.predict(scaled)
|
| 91 |
+
# label = label_encoder.inverse_transform(prediction)
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
### Dependencies
|
| 95 |
+
- scikit-learn==1.5.0
|
| 96 |
+
- librosa==0.10.2.post1
|
| 97 |
+
- numpy==1.26.4
|
| 98 |
+
- joblib
|
| 99 |
+
|
| 100 |
+
---
|
| 101 |
+
|
| 102 |
+
## Requirements
|
| 103 |
+
|
| 104 |
+
```
|
| 105 |
+
transformers>=4.41.2
|
| 106 |
+
torch>=2.3.1
|
| 107 |
+
torchaudio>=2.3.1
|
| 108 |
+
scikit-learn>=1.5.0
|
| 109 |
+
librosa>=0.10.2.post1
|
| 110 |
+
soundfile>=0.12.1
|
| 111 |
+
numpy>=1.26.4
|
| 112 |
+
```
|