diff --git a/Kconfig.projbuild b/Kconfig.projbuild index 844233a..e08bd08 100644 --- a/Kconfig.projbuild +++ b/Kconfig.projbuild @@ -109,13 +109,17 @@ choice SR_WN_MODEL_LOAD depends on IDF_TARGET_ESP32S3 config SR_WN_WN9_JARVIS_TTS - bool "jarvis (wn9_jarvis_tts)" + bool "Jarvis (wn9_jarvis_tts)" depends on IDF_TARGET_ESP32S3 config SR_WN_WN9_COMPUTER_TTS bool "computer (wn9_computer_tts)" depends on IDF_TARGET_ESP32S3 + config SR_WN_WN9_HEYWILLOW_TTS + bool "Hey,Willow (wn9_heywillow_tts)" + depends on IDF_TARGET_ESP32S3 + config SR_WN_WN9_CUSTOMWORD bool "customized word (wn9_customword)" depends on IDF_TARGET_ESP32S3 @@ -145,6 +149,18 @@ menu "Load Multiple Wake Words" bool "Hi,ESP (wn9_hiesp)" default False + config SR_WN_WN9_JARVIS_TTS_MULTI + bool "Jarvis (wn9_jarvis_tts)" + default False + + config SR_WN_WN9_COMPUTER_TTS_MULTI + bool "computer (wn9_computer_tts)" + default False + + config SR_WN_WN9_HEYWILLOW_TTS_MULTI + bool "Hey,Willow (wn9_heywillow_tts)" + depends on IDF_TARGET_ESP32S3 + endmenu config USE_MULTINET diff --git a/model/movemodel.py b/model/movemodel.py index cf979fd..4047259 100644 --- a/model/movemodel.py +++ b/model/movemodel.py @@ -21,45 +21,22 @@ def copy_wakenet_from_sdkconfig(model_path, sdkconfig_path, target_path): """ Copy wakenet model from model_path to target_path based on sdkconfig """ + models = [] with io.open(sdkconfig_path, "r") as f: - models_string = '' for label in f: label = label.strip("\n") - if 'CONFIG_SR_WN' in label and label[0] != '#': - models_string += label - - models = [] - if "CONFIG_SR_WN_WN7Q8_XIAOAITONGXUE" in models_string: - models.append('wn7q8_xiaoaitongxue') - if "CONFIG_SR_WN_WN7_XIAOAITONGXUE" in models_string: - models.append('wn7_xiaoaitongxue') - if "CONFIG_SR_WN_WN8_HILEXIN" in models_string: - models.append('wn8_hilexin') - if "CONFIG_SR_WN_WN8_ALEXA" in models_string: - models.append('wn8_alexa') - if "CONFIG_SR_WN_WN8_HIESP" in models_string: - models.append('wn8_hiesp') - if "CONFIG_SR_WN_WN9_XIAOAITONGXUE" in models_string: - models.append('wn9_xiaoaitongxue') - if "CONFIG_SR_WN_WN9_HILEXIN" in models_string: - models.append('wn9_hilexin') - if "CONFIG_SR_WN_WN9_ALEXA" in models_string: - models.append('wn9_alexa') - if "CONFIG_SR_WN_WN9_HIESP" in models_string: - models.append('wn9_hiesp') - if "CONFIG_SR_WN_WN9_HIMFIVE" in models_string: - models.append('wn9_himfive') - if "CONFIG_SR_WN_WN9_NIHAOXIAOZHI" in models_string: - models.append('wn9_nihaoxiaozhi') - if "CONFIG_SR_WN_WN9_JARVIS_TTS" in models_string: - models.append('wn9_jarvis_tts') - if "CONFIG_SR_WN_WN9_COMPUTER_TTS" in models_string: - models.append('wn9_computer_tts') - if "CONFIG_SR_WN_WN9_CUSTOMWORD" in models_string: - models.append('wn9_customword') + if 'CONFIG_SR_WN' in label and '#' not in label[0]: + if '=' in label: + label = label.split("=")[0] + if '_MULTI' in label: + label = label[:-6] + model_name = label.split("_SR_WN_")[-1].lower() + models.append(model_name) for item in models: - shutil.copytree(model_path + '/wakenet_model/' + item, target_path+'/'+item) + wakeword_model_path = model_path + '/wakenet_model/' + item + if os.path.exists(wakeword_model_path): + shutil.copytree(wakeword_model_path, target_path+'/'+item) def copy_multinet_from_sdkconfig(model_path, sdkconfig_path, target_path): """ diff --git a/model/wakenet_model/wn9_heywillow_tts/_MODEL_INFO_ b/model/wakenet_model/wn9_heywillow_tts/_MODEL_INFO_ new file mode 100644 index 0000000..ccf46ca --- /dev/null +++ b/model/wakenet_model/wn9_heywillow_tts/_MODEL_INFO_ @@ -0,0 +1,2 @@ +# (neural network type)_(model data version)_(lable1_detection windown length_threshold for 90%_threshold for 95%)_(lable2 ...)_... +wakenet9l_tts1h8_heywillow_3_0.644_0.650 diff --git a/model/wakenet_model/wn9_heywillow_tts/wn9_data b/model/wakenet_model/wn9_heywillow_tts/wn9_data new file mode 100644 index 0000000..fa92239 Binary files /dev/null and b/model/wakenet_model/wn9_heywillow_tts/wn9_data differ diff --git a/model/wakenet_model/wn9_heywillow_tts/wn9_index b/model/wakenet_model/wn9_heywillow_tts/wn9_index new file mode 100644 index 0000000..a4dd205 Binary files /dev/null and b/model/wakenet_model/wn9_heywillow_tts/wn9_index differ