whisper_transcribe / tool /json_tool.py
chompionsawelo's picture
Huge changes
59e1d08
raw
history blame contribute delete
584 Bytes
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