Downloads · 30 days
5
29% of all-time downloads
Mathur08/autotrain-mfnfj-9bczx
autotrain-mfnfj-9bczx is a automatic speech recognition model from Mathur08. Use it when you need speech turned into text. It is set up for transformers.
- Problem type: Automatic Speech Recognition
Downloads · 30 days
5
29% of all-time downloads
All-time downloads
17
Public
Parameters
72.6M
290 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors290 MB · 99%
From the Hugging Face model README
No validation metrics available
from transformers import AutoModelForCTC, Wav2Vec2Processor
import torch
import librosa
# Load model and processor
model = AutoModelForCTC.from_pretrained("Mathur08/autotrain-mfnfj-9bczx")
processor = Wav2Vec2Processor.from_pretrained("Mathur08/autotrain-mfnfj-9bczx")
audio, sr = librosa.load("path_to_audio.wav", sr=16000)
inputs = processor(audio, sampling_rate=16000, return_tensors="pt", padding=True)
with torch.no_grad():
logits = model(inputs.input_values).logits
predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(predicted_ids)