Spaces:
Runtime error
Runtime error
Commit
·
1b0ab4a
1
Parent(s):
5da7484
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,18 +101,7 @@ def Transcribe(audio="temp_audio.wav"):
|
|
| 101 |
spacermilli, spacer = preprocess(audio)
|
| 102 |
dz_audio, dzList, segments = diarization(audio)
|
| 103 |
conversation, t_text = transcribe(dz_audio)
|
| 104 |
-
|
| 105 |
-
os.remove("temp_audio.wav")
|
| 106 |
-
except OSError:
|
| 107 |
-
pass
|
| 108 |
-
try:
|
| 109 |
-
os.remove("dz_temp_audio.wav")
|
| 110 |
-
except OSError:
|
| 111 |
-
pass
|
| 112 |
-
try:
|
| 113 |
-
os.remove(f"diarization_{audio}.txt")
|
| 114 |
-
except OSError:
|
| 115 |
-
pass
|
| 116 |
return t_text, json.dumps(conversation)
|
| 117 |
|
| 118 |
def AudioTranscribe(audio, retries=5):
|
|
|
|
| 101 |
spacermilli, spacer = preprocess(audio)
|
| 102 |
dz_audio, dzList, segments = diarization(audio)
|
| 103 |
conversation, t_text = transcribe(dz_audio)
|
| 104 |
+
RemoveAllFiles()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
return t_text, json.dumps(conversation)
|
| 106 |
|
| 107 |
def AudioTranscribe(audio, retries=5):
|