mirror of
https://github.com/espressif/esp-sr.git
synced 2025-09-15 15:28:44 +08:00
feat: Move generated model target to project side
This commit is contained in:
parent
c413a3ed81
commit
f755e1f9ad
@ -98,7 +98,7 @@ elseif(${IDF_TARGET} STREQUAL "esp32s3")
|
|||||||
|
|
||||||
set(MVMODEL_EXE ${COMPONENT_PATH}/model/movemodel.py)
|
set(MVMODEL_EXE ${COMPONENT_PATH}/model/movemodel.py)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${COMPONENT_DIR}/model/target/_MODEL_INFO_
|
OUTPUT ${PROJECT_DIR}/target/_MODEL_INFO_
|
||||||
COMMENT "Running move model..."
|
COMMENT "Running move model..."
|
||||||
COMMAND python ${MVMODEL_EXE} -d1 ${PROJECT_DIR} -d2 ${COMPONENT_PATH}
|
COMMAND python ${MVMODEL_EXE} -d1 ${PROJECT_DIR} -d2 ${COMPONENT_PATH}
|
||||||
DEPENDS ${COMPONENT_DIR}/model/
|
DEPENDS ${COMPONENT_DIR}/model/
|
||||||
@ -110,7 +110,7 @@ elseif(${IDF_TARGET} STREQUAL "esp32s3")
|
|||||||
idf_build_get_property(idf_path IDF_PATH)
|
idf_build_get_property(idf_path IDF_PATH)
|
||||||
set(spiffsgen_py ${PYTHON} ${idf_path}/components/spiffs/spiffsgen.py)
|
set(spiffsgen_py ${PYTHON} ${idf_path}/components/spiffs/spiffsgen.py)
|
||||||
|
|
||||||
get_filename_component(base_dir_full_path ${COMPONENT_DIR}/model/target/ ABSOLUTE)
|
get_filename_component(base_dir_full_path ${PROJECT_DIR}/target/ ABSOLUTE)
|
||||||
|
|
||||||
partition_table_get_partition_info(size "--partition-name model" "size")
|
partition_table_get_partition_info(size "--partition-name model" "size")
|
||||||
partition_table_get_partition_info(offset "--partition-name model" "offset")
|
partition_table_get_partition_info(offset "--partition-name model" "offset")
|
||||||
@ -141,7 +141,7 @@ elseif(${IDF_TARGET} STREQUAL "esp32s3")
|
|||||||
${follow_symlinks}
|
${follow_symlinks}
|
||||||
${use_magic}
|
${use_magic}
|
||||||
${use_magic_len}
|
${use_magic_len}
|
||||||
DEPENDS ${COMPONENT_DIR}/model/target/_MODEL_INFO_
|
DEPENDS ${PROJECT_DIR}/target/_MODEL_INFO_
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY
|
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY
|
||||||
|
|||||||
@ -1,11 +1,8 @@
|
|||||||
version: "1.0.2"
|
version: "1.0.3"
|
||||||
description: esp_sr provides basic algorithms for Speech Recognition applications
|
description: esp_sr provides basic algorithms for Speech Recognition applications
|
||||||
url: https://github.com/espressif/esp-sr
|
url: https://github.com/espressif/esp-sr
|
||||||
dependencies:
|
dependencies:
|
||||||
idf: ">=4.4"
|
idf: ">=4.4"
|
||||||
targets:
|
|
||||||
- esp32
|
|
||||||
- esp32s3
|
|
||||||
files:
|
files:
|
||||||
exclude:
|
exclude:
|
||||||
- ".github"
|
- ".github"
|
||||||
|
|||||||
@ -77,7 +77,7 @@ elif "CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION" in MN_STRING and len(multine
|
|||||||
print(wakenet_model)
|
print(wakenet_model)
|
||||||
print(multinet_model)
|
print(multinet_model)
|
||||||
|
|
||||||
target_model = model_path + '/target'
|
target_model = args.project_path + '/target'
|
||||||
if os.path.exists(target_model):
|
if os.path.exists(target_model):
|
||||||
shutil.rmtree(target_model)
|
shutil.rmtree(target_model)
|
||||||
os.makedirs(target_model)
|
os.makedirs(target_model)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user