feat: 添加一个默认的配置文件
This commit is contained in:
parent
6806119172
commit
363dbb2eb9
|
@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,7 +30,7 @@ _config_dict = None
|
||||||
_pinyin_dict = None
|
_pinyin_dict = None
|
||||||
_pinyin_list = None
|
_pinyin_list = None
|
||||||
|
|
||||||
def load_config_file(filename) -> dict:
|
def load_config_file(filename: str) -> dict:
|
||||||
'''
|
'''
|
||||||
加载json配置文件
|
加载json配置文件
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ def load_config_file(filename) -> dict:
|
||||||
_config_dict = json.load(fp)
|
_config_dict = json.load(fp)
|
||||||
return _config_dict
|
return _config_dict
|
||||||
|
|
||||||
def load_pinyin_dict(filename) -> tuple:
|
def load_pinyin_dict(filename: str) -> tuple:
|
||||||
'''
|
'''
|
||||||
加载拼音列表和拼音字典
|
加载拼音列表和拼音字典
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue