Views
No views yet
omniASR_CTC_1B_v2.| Property | Value |
|---|---|
| HF class | Wav2Vec2ForCTC |
| Encoder layers | 48 |
| Hidden size | 1280 |
| Attention heads | 16 |
| FFN intermediate | 5120 |
| Vocabulary size | 10288 |
| Source framework | fairseq2 |
| Source card | omniASR_CTC_1B_v2 |
| Parity verification | ✅ Verified |
atol=1e-4 on a held-out audio sample.| Model | Transcript |
|---|---|
| fairseq2 (source) | concord returned to its place amidst the tents |
| HuggingFace (this repo) | concord returned to its place amidst the tents |
1from transformers import Wav2Vec2ForCTC, AutoProcessor
2import torch, torchaudio
3
4processor = AutoProcessor.from_pretrained("aadel4/omniASR-CTC-1B-v2")
5model = Wav2Vec2ForCTC.from_pretrained("aadel4/omniASR-CTC-1B-v2")
6model.eval()
7
8waveform, sr = torchaudio.load("audio.wav")
9if sr != 16_000:
10 waveform = torchaudio.functional.resample(waveform, sr, 16_000)
11
12inputs = processor(
13 waveform.squeeze().numpy(), sampling_rate=16_000, return_tensors="pt"
14)
15with torch.no_grad():
16 logits = model(**inputs).logits # (1, T, vocab)
17
18pred_ids = torch.argmax(logits, dim=-1)
19transcript = processor.decode(pred_ids[0])
20print(transcript)