Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,3 +34,15 @@ def transcribe(audio):
|
|
34 |
predicted_ids = model.generate(input_features)
|
35 |
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
predicted_ids = model.generate(input_features)
|
35 |
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
|
36 |
|
37 |
+
return transcription[0] # Decode returns a list
|
38 |
+
|
39 |
+
# Create the Gradio interface
|
40 |
+
iface = gr.Interface(
|
41 |
+
fn=transcribe,
|
42 |
+
inputs=gr.Audio(),
|
43 |
+
outputs="text",
|
44 |
+
title="Whisper Medium Shqip",
|
45 |
+
description="Realtime demo for Sq speech recognition using a fine-tuned Whisper medium model.",
|
46 |
+
)
|
47 |
+
|
48 |
+
iface.launch(share=True)
|