up 5c86457
Patrick von Platen commited on
How to use patrickvonplaten/data2vec-audio-base-10m-4-gram with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="patrickvonplaten/data2vec-audio-base-10m-4-gram") # Load model directly
from transformers import AutoTokenizer, AutoModelForCTC
tokenizer = AutoTokenizer.from_pretrained("patrickvonplaten/data2vec-audio-base-10m-4-gram")
model = AutoModelForCTC.from_pretrained("patrickvonplaten/data2vec-audio-base-10m-4-gram", device_map="auto")