espressif / esp-adf

Espressif Audio Development Framework
Other
1.54k stars 677 forks source link

SR Models cannot be found after wakeword renaming (AUD-5390) #1202

Open seware74 opened 5 months ago

seware74 commented 5 months ago

Problem:

The wakewords were renamed in several of the SR models recently to include a comma. e.g. "heywillow" was changed to "Hey,Willow" This causes the model to not be able to be found in recorder creation.

Issue:

In "recorder_sr.c" In the function "recorder_sr_create" this line: "wn_name = esp_srmodel_filter(recorder_sr->models, ESP_WN_PREFIX, recorder_sr->wn_wakeword);"

tries to lookup a model using the wakeword. However, "esp_srmodel_filter" doesn't look up the model by wakeword. It uses model name.

Since several wakewords were changed recently to insert a comma in _MODELINFO the wakeword and model name are not the same causing the model to not be able to be found.

For example the wakeword "Hey,Willow" cannot be found in the model name wn9_heywillow_tts and model lookup fails causing the recorder creation to fail.

hbler99 commented 2 months ago

Please package the wake word in $ADF_PATH/components/esp-sr/model/pack_model.py. After that, kindly add the corresponding option in Kconfig and ensure it is selected in menuconfig before compiling. Hope these suggestions are helpful to you, lucky.