jiuuee commited on
Commit
4911c46
1 Parent(s): 2ca3e3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
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
- src_lang="en"
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": src_lang,
97
- "target_lang": tgt_lang,
98
  "taskname": taskname,
99
- "pnc": 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
  }