from tool.file_name import * import os import json def load_groups_json(): if not os.path.exists(dir_sample_groups_json) or not os.path.exists(dir_speaker_groups_json): print("JSON file doesn't exist") return [], {} with open(dir_sample_groups_json, "r", encoding="utf-8") as json_file_sample: sample_groups_list: list = json.load(json_file_sample) with open(dir_speaker_groups_json, "r", encoding="utf-8") as json_file_speaker: speaker_groups_dict: dict = json.load(json_file_speaker) return sample_groups_list, speaker_groups_dict