from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="stt-french",return_timestamps=True) result=pipe("french.wav", generate_kwargs={"task": "transcribe","language":"fr"})["text"] print (result)