File size: 309 Bytes
c1efaf9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
# تحميل النموذج
model_id = "openai/whisper-small.en"
asr = gr.Interface.load(f"huggingface/{model_id}")
# واجهة Gradio
gr.Interface(
fn=asr,
inputs=gr.Audio(source="upload", type="filepath"),
outputs="text",
title="Whisper Speech Recognition"
).launch()
|