Spaces:
Runtime error
Runtime error
Commit
·
c774331
1
Parent(s):
315e009
Upload 2 files
Browse files- app.py +12 -0
- requirements.txt +2 -0
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()
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
torch
|
2 |
+
transformers
|