diff --git a/main.py b/main.py index 1529f7d..ea39c03 100644 --- a/main.py +++ b/main.py @@ -314,17 +314,20 @@ def main(): download_vod(vod_url, video_filename) extract_audio(video_filename, audio_filename) - # Check if transcript already exists; if yes, load it, otherwise transcribe and save. - if os.path.exists(transcript_filename): - print(f"{transcript_filename} already exists. Skipping transcription.") - with open(transcript_filename, "r", encoding="utf-8") as f: - result = json.load(f) - else: - print("Transcribing audio. This may take some time...") - result = transcribe_audio_fast(audio_filename, MODEL_NAME) - with open(transcript_filename, "w", encoding="utf-8") as f: - json.dump(result, f, ensure_ascii=False, indent=4) - print(f"Transcript saved to {transcript_filename}") + # # Check if transcript already exists; if yes, load it, otherwise transcribe and save. + # if os.path.exists(transcript_filename): + # print(f"{transcript_filename} already exists. Skipping transcription.") + # with open(transcript_filename, "r", encoding="utf-8") as f: + # result = json.load(f) + # else: + # print("Transcribing audio. This may take some time...") + # result = transcribe_audio(audio_filename, MODEL_NAME) + # with open(transcript_filename, "w", encoding="utf-8") as f: + # json.dump(result, f, ensure_ascii=False, indent=4) + # print(f"Transcript saved to {transcript_filename}") + + print("Transcribing audio. This may take some time...") + result = transcribe_audio_fast(audio_filename, MODEL_NAME) scrape_chat_log(vod_id, chat_log_filename)