Skip to content

Commit 1ad743b

Browse files
committed
Removed the deletion of "Temp.wav" in Whisper ReTimer
Whisper ReTimer: "Fase5": - Removed the deletion of "Temp.wav" as it is no longer created.
1 parent 69f5957 commit 1ad743b

File tree

1 file changed

+5
-9
lines changed
  • Scripts/Whisper Miglioramento Timing

1 file changed

+5
-9
lines changed

Scripts/Whisper Miglioramento Timing/Fase5.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
import os
22
import shutil
33

4-
# Configurazione percorsi
4+
# Percorsi
55
project_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
66
desktop_dir = os.path.join(os.path.expanduser("~"), "Desktop")
77

8-
# File da gestire (in ordine di priorità)
8+
# File da gestire
99
TARGET_FILES = {
1010
'keep': [
11-
"Final.srt", # Prima priorità
12-
"whisper_adjusted.srt", # Seconda priorità
11+
"Final.srt",
12+
"whisper_adjusted.srt",
1313

1414
],
1515
'cleanup': [
1616
"whisper.srt",
1717
"whisper.aac",
1818
"vocali.wav",
19-
"temp.wav",
2019
"scene_timestamps.srt",
2120
"scene_timestamps_adjusted.srt"
2221
]
2322
}
2423

2524
def find_existing_files(file_list, search_dir):
26-
"""Cerca i file esistenti senza output"""
2725
return [f for f in file_list if os.path.exists(os.path.join(search_dir, f))]
2826

2927
def move_to_desktop(files, source_dir, dest_dir):
30-
"""Sposta i file sul Desktop senza output"""
3128
for filename in files:
3229
try:
3330
shutil.move(os.path.join(source_dir, filename),
@@ -36,15 +33,14 @@ def move_to_desktop(files, source_dir, dest_dir):
3633
pass
3734

3835
def cleanup_files(files, target_dir):
39-
"""Elimina i file residui senza output"""
4036
for filename in files:
4137
try:
4238
os.remove(os.path.join(target_dir, filename))
4339
except Exception:
4440
pass
4541

4642
def main():
47-
# Cerca automaticamente il primo file MKV
43+
# Cerca MKV
4844
mkv_files = [f for f in os.listdir(project_dir) if f.endswith('.mkv')]
4945
if not mkv_files:
5046
raise FileNotFoundError("Nessun file .mkv trovato nella directory.")

0 commit comments

Comments
 (0)