Update app.py
Browse files
app.py
CHANGED
@@ -79,11 +79,7 @@ def convert_audio(audio_filepath, tmpdir, utt_id):
|
|
79 |
|
80 |
|
81 |
def transcribe(audio_filepath, src_lang, tgt_lang, pnc):
|
82 |
-
|
83 |
-
tgt_lang="en"
|
84 |
-
pnc="no"
|
85 |
-
|
86 |
-
if audio_filepath is None:
|
87 |
raise gr.Error("Please provide some input audio: either upload an audio file or use the microphone")
|
88 |
|
89 |
utt_id = uuid.uuid4()
|
@@ -93,10 +89,10 @@ def transcribe(audio_filepath, src_lang, tgt_lang, pnc):
|
|
93 |
# make manifest file and save
|
94 |
manifest_data = {
|
95 |
"audio_filepath": converted_audio_filepath,
|
96 |
-
"source_lang":
|
97 |
-
"target_lang":
|
98 |
"taskname": taskname,
|
99 |
-
"pnc":
|
100 |
"answer": "predict",
|
101 |
"duration": str(duration),
|
102 |
}
|
|
|
79 |
|
80 |
|
81 |
def transcribe(audio_filepath, src_lang, tgt_lang, pnc):
|
82 |
+
if audio_filepath is None:
|
|
|
|
|
|
|
|
|
83 |
raise gr.Error("Please provide some input audio: either upload an audio file or use the microphone")
|
84 |
|
85 |
utt_id = uuid.uuid4()
|
|
|
89 |
# make manifest file and save
|
90 |
manifest_data = {
|
91 |
"audio_filepath": converted_audio_filepath,
|
92 |
+
"source_lang": "en",
|
93 |
+
"target_lang": "en",
|
94 |
"taskname": taskname,
|
95 |
+
"pnc": "no",
|
96 |
"answer": "predict",
|
97 |
"duration": str(duration),
|
98 |
}
|