Spaces:
Runtime error
Runtime error
Add explicit input
Browse files- .gitignore +4 -0
- app.py +9 -1
.gitignore
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.env
|
2 |
+
env
|
3 |
+
__pycache__
|
4 |
+
*.wav
|
app.py
CHANGED
@@ -1,3 +1,11 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
+
pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3")
|
5 |
+
|
6 |
+
def transcribe(audio):
|
7 |
+
return pipe(audio)['text']
|
8 |
+
|
9 |
+
app = gr.Interface(transcribe, gr.Audio(sources=["microphone"]), outputs="textbox")
|
10 |
+
|
11 |
+
app.launch()
|