Spaces:
Runtime error
Runtime error
liuyang
commited on
Commit
·
d2ef882
1
Parent(s):
abc1edf
fix typo
Browse files
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 |
-
|
| 1060 |
-
|
| 1061 |
-
|
| 1062 |
-
|
| 1063 |
-
|
| 1064 |
-
|
| 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):
|