Add Hey Willow model: wn9_heywillow_tts

This commit is contained in:
xysun 2023-12-28 14:42:54 +08:00
parent 36ec4242d0
commit 89e11d81f0
5 changed files with 30 additions and 35 deletions

View File

@ -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

View File

@ -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):
"""

View File

@ -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

Binary file not shown.

Binary file not shown.