from transformers import pipeline # Load the pipeline with automatic device mapping for multi-GPU setupspipe = pipeline( "automatic-speech-recognition", model="MaddoggProduction/whisper-small-quran-lora-everyayah", device_map="auto" # auto for multiple GPUs, n: for GPU n, -1: for CPU) # Transcribe audio with chunkingresult = pipe( "path_to_audio.mp3", chunk_length_s=30, stride_length_s=3, batch_size=8, return_timestamps=True, generate_kwargs={ "task": "transcribe", "language": "arabic", #"temperature": 0.0, # Greedy decoding, recommended for stability. Adjust as needed #"num_beams": 5, # Adjust as needed, 5 for stability }) print(result["text"])