Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,22 +27,10 @@ def load_data(input_file):
|
|
27 |
def asr_pipe(input_file):
|
28 |
transcription = p(input_file, chunk_length_s=3, stride_length_s=(1, 1))
|
29 |
return transcription
|
30 |
-
|
31 |
-
def transcribe(audio, state=""):
|
32 |
-
#time.sleep(2)
|
33 |
-
text = p(audio)["text"]
|
34 |
-
state += text + " "
|
35 |
-
return state, state
|
36 |
|
37 |
gr.Interface(transcribe,
|
38 |
-
inputs =
|
39 |
-
|
40 |
-
"state"
|
41 |
-
],
|
42 |
-
outputs = [
|
43 |
-
gr.outputs.Textbox(label="Erkannten Text"),
|
44 |
-
"state"
|
45 |
-
],
|
46 |
title="Sproocherkennung fir d'Lëtzebuergescht @uni.lu",
|
47 |
description = "Dës App convertéiert Är geschwate Sprooch an de (méi oder manner richtegen ;-)) Text!",
|
48 |
examples = [["ChamberMeisch.wav"], ["Chamber_Fayot_2005.wav"], ["Erlieft-a-Verzielt.wav"], ["Schnessen_Beispill.wav"]], theme="default").launch()
|
|
|
27 |
def asr_pipe(input_file):
|
28 |
transcription = p(input_file, chunk_length_s=3, stride_length_s=(1, 1))
|
29 |
return transcription
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
gr.Interface(transcribe,
|
32 |
+
inputs = gr.inputs.Audio(source="microphone", type="filepath", optional=True, label="Hei kënnt Dir Är Sprooch iwwert de Mikro ophuelen"),
|
33 |
+
outputs = gr.outputs.Textbox(label="Erkannten Text"),
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
title="Sproocherkennung fir d'Lëtzebuergescht @uni.lu",
|
35 |
description = "Dës App convertéiert Är geschwate Sprooch an de (méi oder manner richtegen ;-)) Text!",
|
36 |
examples = [["ChamberMeisch.wav"], ["Chamber_Fayot_2005.wav"], ["Erlieft-a-Verzielt.wav"], ["Schnessen_Beispill.wav"]], theme="default").launch()
|