diff --git a/asrtConfig.json b/asrtConfig.json new file mode 100644 index 0000000..3fe045f --- /dev/null +++ b/asrtConfig.json @@ -0,0 +1,51 @@ +{ + "dict_filename": "dict.txt", + + "dataset":{ + "train":[ + { + "name": "thchs30_train", + "data_list": "/data/speech_data/thchs30/train.wav.lst", + "data_path": "/data/speech_data", + "label_list": "/data/speech_data/thchs30/train.syllable.txt" + }, + { + "name": "stcmds_train", + "data_list": "/data/speech_data/stcmds/train.wav.lst", + "data_path": "/data/speech_data", + "label_list": "/data/speech_data/stcmds/train.syllable.txt" + } + ], + + "dev":[ + { + "name": "thchs30_dev", + "data_list": "/data/speech_data/thchs30/cv.wav.lst", + "data_path": "/data/speech_data", + "label_list": "/data/speech_data/thchs30/cv.syllable.txt" + }, + { + "name": "stcmds_dev", + "data_list": "/data/speech_data/stcmds/dev.wav.lst", + "data_path": "/data/speech_data", + "label_list": "/data/speech_data/stcmds/dev.syllable.txt" + } + ], + + "test":[ + { + "name": "thchs30_test", + "data_list": "/data/speech_data/thchs30/test.wav.lst", + "data_path": "/data/speech_data", + "label_list": "/data/speech_data/thchs30/test.syllable.txt" + }, + { + "name": "stcmds_test", + "data_list": "/data/speech_data/stcmds/test.wav.lst", + "data_path": "/data/speech_data", + "label_list": "/data/speech_data/stcmds/test.syllable.txt" + } + ] + + } +} \ No newline at end of file diff --git a/utils/config.py b/utils/config.py index 1c733a6..6ac0990 100644 --- a/utils/config.py +++ b/utils/config.py @@ -30,7 +30,7 @@ _config_dict = None _pinyin_dict = None _pinyin_list = None -def load_config_file(filename) -> dict: +def load_config_file(filename: str) -> dict: ''' 加载json配置文件 @@ -48,7 +48,7 @@ def load_config_file(filename) -> dict: _config_dict = json.load(fp) return _config_dict -def load_pinyin_dict(filename) -> tuple: +def load_pinyin_dict(filename: str) -> tuple: ''' 加载拼音列表和拼音字典