Downloads · 30 days
133
21% of all-time downloads
aadel4/omniASR-CTC-300M
omniASR-CTC-300M is a automatic speech recognition model from aadel4. Use it when you need speech turned into text. It is set up for transformers.
Wav2Vec2 CTC ASR model (300M) converted from the OmniLingual fairseq2 checkpoint omniASRCTC300M.
Downloads · 30 days
133
21% of all-time downloads
All-time downloads
622
Public
Parameters
325M
1.3 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.3 GB · 100%
From the Hugging Face model README
Wav2Vec2 CTC ASR model (300M) converted from the OmniLingual fairseq2 checkpoint omniASR_CTC_300M.
This model outputs CTC logits over a SentencePiece vocabulary and can transcribe speech in multiple languages.
The code base for the conversion can be found here. I was only able to convert the 300M and 1B models due to GPU limitations. Contributions are welcome.
| Property | Value |
|---|---|
| HF class | Wav2Vec2ForCTC |
| Encoder layers | 24 |
| Hidden size | 1024 |
| Attention heads | 16 |
| FFN intermediate | 4096 |
| Vocabulary size | 9812 |
| Source framework | fairseq2 |
| Source card | omniASR_CTC_300M |
| Parity verification | ✅ Verified |
Numerical parity against the original fairseq2 checkpoint has been confirmed: outputs match to within atol=1e-4 on a held-out audio sample.
Sample transcriptions on the held-out audio clip:
| Model | Transcript |
|---|---|
| fairseq2 (source) | concord wereturned to its place amidst the tents |
| HuggingFace (this repo) | concord wereturned to its place amidst the tents |
from transformers import Wav2Vec2ForCTC, AutoProcessor
import torch, torchaudio
processor = AutoProcessor.from_pretrained("aadel4/omniASR-CTC-300M")
model = Wav2Vec2ForCTC.from_pretrained("aadel4/omniASR-CTC-300M")
model.eval()
waveform, sr = torchaudio.load("audio.wav")
if sr != 16_000:
waveform = torchaudio.functional.resample(waveform, sr, 16_000)
inputs = processor(
waveform.squeeze().numpy(), sampling_rate=16_000, return_tensors="pt"
)
with torch.no_grad():
logits = model(**inputs).logits # (1, T, vocab)
pred_ids = torch.argmax(logits, dim=-1)
transcript = processor.decode(pred_ids[0])
print(transcript)