Spaces:
Runtime error
Runtime error
Commit
·
2ac91cb
1
Parent(s):
64174a4
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
+
p = pipeline("automatic-speech-recognition")
|
4 |
+
|
5 |
+
def transcribe(audio):
|
6 |
+
text = p(audio)["text"]
|
7 |
+
return text
|
8 |
+
|
9 |
+
gr.Interface(
|
10 |
+
fn=transcribe,
|
11 |
+
inputs=gr.Audio(source="microphone", type="filepath"),
|
12 |
+
outputs="text").launch()
|