openslr/openslr
Updated • 606 • 28
How to use AstralZander/yoruba_ASR with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="AstralZander/yoruba_ASR") # Load model directly
from transformers import AutoProcessor, AutoModelForCTC
processor = AutoProcessor.from_pretrained("AstralZander/yoruba_ASR")
model = AutoModelForCTC.from_pretrained("AstralZander/yoruba_ASR")facebook/wav2vec2-xls-r-300m fine-tuned on openslr (SLR86) and mozilla-foundation/common_voice_12_0 for Yoruba language.
WER: 0.51
from huggingsound import SpeechRecognitionModel
model = SpeechRecognitionModel("AstralZander/yoruba_ASR")
audio_paths = [audio_path] # List with paths to audio
transcriptions = model.transcribe(audio_paths)
transcriptions # List of transcriptions, timestamps and probabilities
transcriptions[ind_audio]['transcription'] # Transcription of audio with the ind_audio index from the audio_paths list