feat: 添加一个默认的配置文件

This commit is contained in:
nl 2021-11-10 20:09:50 +08:00
parent 6806119172
commit 363dbb2eb9
2 changed files with 53 additions and 2 deletions

51
asrtConfig.json Normal file
View File

@ -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"
}
]
}
}

View File

@ -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:
'''
加载拼音列表和拼音字典