From 363dbb2eb91082bfe8c6b27470cc6b26a09f8c67 Mon Sep 17 00:00:00 2001 From: nl <3210346136@qq.com> Date: Wed, 10 Nov 2021 20:09:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=9A=84=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- asrtConfig.json | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ utils/config.py | 4 ++-- 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 asrtConfig.json 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: ''' 加载拼音列表和拼音字典