pgilles commited on
Commit
0d69e89
·
1 Parent(s): 022f864

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -14
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
- gr.inputs.Audio(source="microphone", type="filepath", optional=True, label="Hei kënnt Dir Är Sprooch iwwert de Mikro ophuelen"),
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()