google/fleurs
Viewer • Updated • 768k • 91.4k • 438
How to use Finnish-NLP/whisper-medium-finnish with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="Finnish-NLP/whisper-medium-finnish") # Load model directly
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
processor = AutoProcessor.from_pretrained("Finnish-NLP/whisper-medium-finnish")
model = AutoModelForSpeechSeq2Seq.from_pretrained("Finnish-NLP/whisper-medium-finnish", device_map="auto")