Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,14 +28,15 @@ def load_data(input_file):
|
|
28 |
#speech = librosa.effects.trim(speech, top_db= 10)
|
29 |
return speech
|
30 |
|
31 |
-
def asr_pipe(input_file, input_file_microphone
|
32 |
input_file = input_file_microphone if input_file_microphone else input_file
|
33 |
transcription = pipe(input_file, chunk_length_s= 30)["text"]
|
34 |
return transcription
|
35 |
|
36 |
inputs = [gr.inputs.Audio(source="upload", type='filepath', label="Eng Audio-Datei eroplueden...", optional = True),
|
37 |
gr.inputs.Audio(source="microphone", type="filepath", label="... oder direkt mam Mikro ophuelen", optional = True),
|
38 |
-
gr.Slider(minimum=3, maximum=32, value=29, step=0.5, label="Chunk Length")
|
|
|
39 |
|
40 |
outputs = [gr.outputs.Textbox(label="Erkannten Text")]
|
41 |
|
|
|
28 |
#speech = librosa.effects.trim(speech, top_db= 10)
|
29 |
return speech
|
30 |
|
31 |
+
def asr_pipe(input_file, input_file_microphone):
|
32 |
input_file = input_file_microphone if input_file_microphone else input_file
|
33 |
transcription = pipe(input_file, chunk_length_s= 30)["text"]
|
34 |
return transcription
|
35 |
|
36 |
inputs = [gr.inputs.Audio(source="upload", type='filepath', label="Eng Audio-Datei eroplueden...", optional = True),
|
37 |
gr.inputs.Audio(source="microphone", type="filepath", label="... oder direkt mam Mikro ophuelen", optional = True),
|
38 |
+
#gr.Slider(minimum=3, maximum=32, value=29, step=0.5, label="Chunk Length")
|
39 |
+
]
|
40 |
|
41 |
outputs = [gr.outputs.Textbox(label="Erkannten Text")]
|
42 |
|