import os
import test_whisper
import test_whisper_timestamped
import test_whisperx


path = r"E:\Corpus\Emilia\emilia_ja_dataset_test"
fnames = list(set([f.split(".")[0] for f in os.listdir(path)]))
fnames.sort()




for fname in fnames:

    txt_name = f"{fname}.txt"
    wav_name = f"{fname}.wav"

    txt_path = os.path.join(path, txt_name)
    wav_path = os.path.join(path, wav_name)

    if not os.path.exists(txt_path) or not os.path.exists(wav_path):
        continue

    # Test:
    # test_whisperx.transcribe_audio(wav_path)
    test_whisper_timestamped.transcribe_audio(wav_path)


