Spaces:
Runtime error
Runtime error
convert_to_text func added
Browse files
app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
def
|
4 |
-
|
|
|
|
|
5 |
|
6 |
-
iface = gr.Interface(fn=
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
import whisper
|
3 |
|
4 |
+
def convert_to_text(audio_path : str) -> str:
|
5 |
+
model = whisper.load_model("base")
|
6 |
+
result = model.transcribe(audio_path)
|
7 |
+
return result["text"]
|
8 |
|
9 |
+
iface = gr.Interface(fn=convert_to_text, inputs="audio", outputs="text")
|
10 |
iface.launch()
|