Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,17 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
4 |
+
pipe = pipeline(model="emre/whisper-medium-turkish-2")
|
5 |
+
def transcribe(audio):
|
6 |
+
text = pipe(audio)["text"]
|
7 |
+
return text
|
8 |
+
|
9 |
+
iface = gr.Interface(
|
10 |
+
fn=transcribe,
|
11 |
+
inputs=gr.Audio(source="microphone", type="filepath"),
|
12 |
+
outputs="text",
|
13 |
+
title="Whisper Medium Turkish",
|
14 |
+
description="Realtime demo for Turkish speech recognition using a fine-tuned Whisper Medium model.",
|
15 |
+
)
|
16 |
+
|
17 |
+
iface.launch()
|