import torch from transformers import pipeline def get_transcribe_transformers(url:str, model: str): device = "cuda:0" if torch.cuda.is_available() else "cpu" pipe = pipeline("automatic-speech-recognition", model=model, return_timestamps=True, device=device) result = pipe(url) return result.get("text"), result.get("chunks")