liuyang commited on
Commit
d2ef882
·
1 Parent(s): abc1edf
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1056,12 +1056,12 @@ class WhisperTranscriber:
1056
  # Clean up preprocessed wav
1057
  if pre_meta:
1058
  for pre_meta in pre_metas:
1059
- for chunk in pre_meta["segments"]:
1060
- if chunk.get("out_wav_path") and os.path.exists(chunk["out_wav_path"]):
1061
- try:
1062
- os.unlink(chunk["out_wav_path"])
1063
- except Exception:
1064
- pass
1065
 
1066
  @spaces.GPU # each call gets a GPU slice
1067
  def process_audio_diarization(self, task_json, num_speakers=0):
 
1056
  # Clean up preprocessed wav
1057
  if pre_meta:
1058
  for pre_meta in pre_metas:
1059
+ chunk = pre_meta["chunk"]
1060
+ if chunk.get("out_wav_path") and os.path.exists(chunk["out_wav_path"]):
1061
+ try:
1062
+ os.unlink(chunk["out_wav_path"])
1063
+ except Exception:
1064
+ pass
1065
 
1066
  @spaces.GPU # each call gets a GPU slice
1067
  def process_audio_diarization(self, task_json, num_speakers=0):