This is a
Wav2Vec2
style ASR model trained in
fairseq
and ported to Hugging Face.
More details on datasets, training-setup and conversion to HuggingFace format can be found in the
IndicWav2Vec
repo.
Script to Run Inference
import torch
from datasets import load_dataset
from transformers import AutoModelForCTC, AutoProcessor
import torchaudio.functional as F
DEVICE_ID = "cuda"if torch.cuda.is_available() else"cpu"
MODEL_ID = "ai4bharat/indicwav2vec-odia"
sample = next(iter(load_dataset("common_voice", "or", split="test", streaming=True)))
resampled_audio = F.resample(torch.tensor(sample["audio"]["array"]), 48000, 16000).numpy()
model = AutoModelForCTC.from_pretrained(MODEL_ID).to(DEVICE_ID)
processor = AutoProcessor.from_pretrained(MODEL_ID)
input_values = processor(resampled_audio, return_tensors="pt").input_values
with torch.no_grad():
logits = model(input_values.to(DEVICE_ID)).logits.cpu()
prediction_ids = torch.argmax(logits, dim=-1)
output_str = processor.batch_decode(prediction_ids)[0]
print(f"Greedy Decoding: {output_str}")
indicwav2vec-odia huggingface.co is an AI model on huggingface.co that provides indicwav2vec-odia's model effect (), which can be used instantly with this ai4bharat indicwav2vec-odia model. huggingface.co supports a free trial of the indicwav2vec-odia model, and also provides paid use of the indicwav2vec-odia. Support call indicwav2vec-odia model through api, including Node.js, Python, http.
indicwav2vec-odia huggingface.co is an online trial and call api platform, which integrates indicwav2vec-odia's modeling effects, including api services, and provides a free online trial of indicwav2vec-odia, you can try indicwav2vec-odia online for free by clicking the link below.
ai4bharat indicwav2vec-odia online free url in huggingface.co:
indicwav2vec-odia is an open source model from GitHub that offers a free installation service, and any user can find indicwav2vec-odia on GitHub to install. At the same time, huggingface.co provides the effect of indicwav2vec-odia install, users can directly use indicwav2vec-odia installed effect in huggingface.co for debugging and trial. It also supports api for free installation.