xci/fix_bug

1.delete yml test by esp-at
This commit is contained in:
LiJunu 2022-11-16 18:30:53 +08:00
parent 6fa77f1ac8
commit 0981bc8425
17 changed files with 105 additions and 491 deletions

2
.gitignore vendored
View File

@ -3,4 +3,4 @@ sdkconfig.old
sdkconfig
model/target/*
.vscode
_build/
docs/_build/*

View File

@ -5,11 +5,16 @@ stages:
# global variables
variables: &global-variables
ESP_DOCS_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.0:2-2"
IDF_PATH: "$CI_PROJECT_DIR/esp-idf"
IDF_REPO: ${GITLAB_SSH_SERVER}/espressif/esp-idf.git
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: recursive
ESPCI_TOKEN: $GITLAB_KEY
before_script:
- echo $ESP_DOCS_ENV_IMAGE
default:
retry:
max: 2
@ -22,416 +27,9 @@ default:
- esp-idf/tools/idf_tools.py install
- esp-idf/tools/idf_tools.py export
.before_build_esp32_series: &before_build_esp32_series
- cd components/at/private_include
- rm -f at_ota_token.h
- echo -e "#pragma once" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_TOKEN_WROOM32 \"$AT_OTA_TOKEN_WROOM32\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_SSL_TOKEN_WROOM32 \"$AT_OTA_TOKEN_WROOM32\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_TOKEN_WROVER32 \"$AT_OTA_TOKEN_WROVER32\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_SSL_TOKEN_WROVER32 \"$AT_OTA_TOKEN_WROVER32\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_TOKEN_ESP32_PICO_D4 \"$AT_OTA_TOKEN_ESP32_PICO_D4\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_SSL_TOKEN_ESP32_PICO_D4 \"$AT_OTA_TOKEN_ESP32_PICO_D4\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_TOKEN_ESP32_SOLO_1 \"$AT_OTA_TOKEN_ESP32_SOLO_1\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_SSL_TOKEN_ESP32_SOLO_1 \"$AT_OTA_TOKEN_ESP32_SOLO_1\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_TOKEN_ESP32_MINI_1 \"$AT_OTA_TOKEN_ESP32_MINI_1\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_SSL_TOKEN_ESP32_MINI_1 \"$AT_OTA_TOKEN_ESP32_MINI_1\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_TOKEN_ESP32_QCLOUD \"$AT_OTA_TOKEN_ESP32_QCLOUD\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_SSL_TOKEN_ESP32_QCLOUD \"$AT_OTA_TOKEN_ESP32_QCLOUD\"" >> at_ota_token.h
- cd -
- *setup_idf_ci_env
- export esp_sr_PROJECT_BRANCH=${CI_COMMIT_REF_NAME}
.before_build_esp32c3_series: &before_build_esp32c3_series
- cd components/at/private_include
- rm -f at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_TOKEN_ESP32C3_MINI \"$AT_OTA_TOKEN_ESP32C3_MINI\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_SSL_TOKEN_ESP32C3_MINI \"$AT_OTA_TOKEN_ESP32C3_MINI\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_TOKEN_ESP32C3_MINI_QCLOUD \"$AT_OTA_TOKEN_ESP32C3_MINI_QCLOUD\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_SSL_TOKEN_ESP32C3_MINI_QCLOUD \"$AT_OTA_TOKEN_ESP32C3_MINI_QCLOUD\"" >> at_ota_token.h
- cd -
- *setup_idf_ci_env
- export esp_sr_PROJECT_BRANCH=${CI_COMMIT_REF_NAME}
.before_build_esp32c2_series: &before_build_esp32c2_series
- cd components/at/private_include
- rm -f at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_TOKEN_ESP32C2_2MB \"$ESP32C2_2MB_TOKEN\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_SSL_TOKEN_ESP32C2_2MB \"$ESP32C2_2MB_TOKEN\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_TOKEN_ESP32C2_4MB \"$ESP32C2_4MB_TOKEN\"" >> at_ota_token.h
- echo -e "#define CONFIG_esp_sr_OTA_SSL_TOKEN_ESP32C2_4MB \"$ESP32C2_4MB_TOKEN\"" >> at_ota_token.h
- cd -
- *setup_idf_ci_env
- export esp_sr_PROJECT_BRANCH=${CI_COMMIT_REF_NAME}
.esp_sr_build_template:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env-v5.0:2
tags:
- build
variables:
<<: *global-variables
before_script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GITLAB_KEY >> ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
artifacts:
name: esp-sr-artifacts
paths:
- sdkconfig
- build/*.bin
- build/*.elf
- build/*.map
- build/bootloader/*.bin
- build/partition_table/*.bin
- build/customized_partitions/*.bin
- build/flasher_args.json
- build/download.config
- build/factory/*
expire_in: 6 mos
.esp_sr_build_template_esp32c2:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env-v5.0:2
tags:
- build
variables:
<<: *global-variables
before_script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GITLAB_KEY >> ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
artifacts:
name: esp-sr-artifacts
paths:
- sdkconfig
- build/*.bin
- build/*.elf
- build/*.map
- build/bootloader/*.bin
- build/partition_table/*.bin
- build/customized_partitions/*.bin
- build/flasher_args.json
- build/download.config
- build/factory/*
- build/custom_ota_binaries/*
expire_in: 6 mos
.execute_script_esp32: &execute_script_esp32
- sed -i "s?https://github.com?$GITLAB_SSH_SERVER?g" module_config/${MODULE_CFG_DIR}/IDF_VERSION
- mkdir build
- cp module_info.json build/module_info.json
- export HAS_IDF_PREREQUISITES=1
- ./build.py install
- rm -rf build && mkdir build
- mv module_info.json build/module_info.json
- *before_build_esp32_series
- ./build.py build
.execute_script_esp32c3: &execute_script_esp32c3
- sed -i "s?https://github.com?$GITLAB_SSH_SERVER?g" module_config/${MODULE_CFG_DIR}/IDF_VERSION
- mkdir build
- cp module_info.json build/module_info.json
- export HAS_IDF_PREREQUISITES=1
- ./build.py install
- rm -rf build && mkdir build
- mv module_info.json build/module_info.json
- *before_build_esp32c3_series
- ./build.py build
.execute_script_esp32c2: &execute_script_esp32c2
- sed -i "s?https://github.com?$GITLAB_SSH_SERVER?g" module_config/${MODULE_CFG_DIR}/IDF_VERSION
- mkdir build
- cp module_info.json build/module_info.json
- export HAS_IDF_PREREQUISITES=1
- ./build.py install
- rm -rf build && mkdir build
- mv module_info.json build/module_info.json
- *before_build_esp32c2_series
- ./build.py build
esp32_wroom_at:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32_default
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"WROOM-32\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32
esp32_wrover_at:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_wrover-32
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"WROVER-32\", \"description\": \"\",\"silence\": 1}" > module_info.json'
- *execute_script_esp32
esp32_pico_d4_at:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32_default
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"PICO-D4\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32
esp32_solo_1_at:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32_default
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"SOLO-1\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32
esp32-d2wd_at:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32-d2wd
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"ESP32-D2WD\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32
esp32_mini_1_at:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32_default
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"MINI-1\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32
esp32_sdio_at:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32-sdio
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"ESP32-SDIO\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32
esp32_qcloud:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32_qcloud
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"ESP32_QCLOUD\", \"description\": \"QCLOUD TX:17 RX:16\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32
esp32_at_all_function_test_without_bt:
extends:
- .esp_sr_build_template
script:
- echo -e "CONFIG_AT_FS_COMMAND_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_ETHERNET_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_EAP_COMMAND_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_DRIVER_COMMAND_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_WEB_SERVER_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_WEB_CAPTIVE_PORTAL_ENABLE=y" >> module_config/module_wrover-32/sdkconfig.defaults
# disable BT
- echo -e "CONFIG_AT_BLE_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_BLE_HID_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_BLUFI_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_BT_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- sed -i '/ota_1/d' module_config/module_wrover-32/partitions_at.csv
- old_size_str=`cat module_config/module_wrover-32/partitions_at.csv | grep ota_0 | awk -F, '{print $5}'`
- let old_value=$old_size_str
- new_value=`expr $old_value + $old_value`
- new_size_str=`printf "0x%x" ${new_value}`
- sed -i '/ota_0/s/'$old_size_str'/'$new_size_str'/g' module_config/module_wrover-32/partitions_at.csv
- export MODULE_CFG_DIR=module_wrover-32
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"WROVER-32\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32
esp32_at_all_function_test_just_bt:
extends:
- .esp_sr_build_template
script:
# enable BT
- echo -e "CONFIG_AT_BT_COMMAND_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_BT_SPP_COMMAND_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_BT_A2DP_COMMAND_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
# disable non BT
- echo -e "CONFIG_AT_FS_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_ETHERNET_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_EAP_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_DRIVER_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_WEB_SERVER_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_WEB_CAPTIVE_PORTAL_ENABLE=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_OTA_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_MDNS_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_WPS_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_SMARTCONFIG_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_PING_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_MQTT_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_HTTP_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_SIGNALING_COMMAND_SUPPORT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_ESP_WIFI_SLP_IRAM_OPT=n" >> module_config/module_wrover-32/sdkconfig.defaults
- sed -i '/ota_1/d' module_config/module_wrover-32/partitions_at.csv
- old_size_str=`cat module_config/module_wrover-32/partitions_at.csv | grep ota_0 | awk -F, '{print $5}'`
- let old_value=$old_size_str
- new_value=`expr $old_value + $old_value`
- new_size_str=`printf "0x%x" ${new_value}`
- sed -i '/ota_0/s/'$old_size_str'/'$new_size_str'/g' module_config/module_wrover-32/partitions_at.csv
- export MODULE_CFG_DIR=module_wrover-32
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"WROVER-32\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32
esp32_ethernet_at:
extends:
- .esp_sr_build_template
script:
- echo -e "CONFIG_AT_FS_COMMAND_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_ETHERNET_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
- echo -e "CONFIG_AT_EAP_COMMAND_SUPPORT=y" >> module_config/module_wrover-32/sdkconfig.defaults
- sed -i '/ota_1/d' module_config/module_wrover-32/partitions_at.csv
- old_size_str=`cat module_config/module_wrover-32/partitions_at.csv | grep ota_0 | awk -F, '{print $5}'`
- let old_value=$old_size_str
- new_value=`expr $old_value + $old_value`
- new_size_str=`printf "0x%x" ${new_value}`
- sed -i '/ota_0/s/'$old_size_str'/'$new_size_str'/g' module_config/module_wrover-32/partitions_at.csv
- export MODULE_CFG_DIR=module_wrover-32
- 'echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"WROVER-32\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32
esp32c3_mini_1_at:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32c3_default
- 'echo -e "{\"platform\": \"PLATFORM_ESP32C3\", \"module\": \"MINI-1\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32c3
esp32c3_at_full_function_test:
extends:
- .esp_sr_build_template
script:
# enable all features
- echo -e "CONFIG_AT_FS_COMMAND_SUPPORT=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
- echo -e "CONFIG_AT_DRIVER_COMMAND_SUPPORT=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
- echo -e "CONFIG_AT_EAP_COMMAND_SUPPORT=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
- echo -e "CONFIG_AT_WEB_SERVER_SUPPORT=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
- echo -e "CONFIG_AT_WEB_CAPTIVE_PORTAL_ENABLE=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
- export MODULE_CFG_DIR=module_esp32c3_default
- 'echo -e "{\"platform\": \"PLATFORM_ESP32C3\", \"module\": \"MINI-1\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32c3
esp32c3_spi_at:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32c3-spi
- 'echo -e "{\"platform\": \"PLATFORM_ESP32C3\", \"module\": \"ESP32C3-SPI\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32c3
esp32c3_qcloud:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32c3_qcloud
- 'echo -e "{\"platform\": \"PLATFORM_ESP32C3\", \"module\": \"ESP32C3_QCLOUD\", \"description\": \"QCLOUD TX:7 RX:6\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32c3
esp32c3_rainmaker:
extends:
- .esp_sr_build_template
script:
- export MODULE_CFG_DIR=module_esp32c3_rainmaker
- 'echo -e "{\"platform\": \"PLATFORM_ESP32C3\", \"module\": \"ESP32C3_RAINMAKER\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32c3
esp32c2_4mb_at:
extends:
- .esp_sr_build_template_esp32c2
script:
- export MODULE_CFG_DIR=module_esp32c2_default
- 'echo -e "{\"platform\": \"PLATFORM_ESP32C2\", \"module\": \"ESP32C2-4MB\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32c2
esp32c2_4mb_at_xtal_40mhz_test:
extends:
- .esp_sr_build_template_esp32c2
script:
# enable 40mhz xtal freq
- echo -e "CONFIG_XTAL_FREQ_40=y" >> module_config/module_esp32c2_default/sdkconfig.defaults
- export MODULE_CFG_DIR=module_esp32c2_default
- 'echo -e "{\"platform\": \"PLATFORM_ESP32C2\", \"module\": \"ESP32C2-4MB\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32c2
esp32c2_2mb_at:
extends:
- .esp_sr_build_template_esp32c2
script:
- export MODULE_CFG_DIR=module_esp32c2-2mb
- 'echo -e "{\"platform\": \"PLATFORM_ESP32C2\", \"module\": \"ESP32C2-2MB\", \"description\": \"\",\"silence\": 0}" > module_info.json'
- *execute_script_esp32c2
push_master_to_github:
stage: deploy
only:
- master
- /^release\/v.*$/
tags:
- deploy
when: on_success
image: $CI_DOCKER_REGISTRY/esp-env-v4.4:1
variables:
GIT_STRATEGY: clone
GITHUB_PUSH_REFS: refs/remotes/origin/release refs/remotes/origin/master
script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- git remote add github git@github.com:espressif/esp-sr.git
# - git push --follow-tags github HEAD:master
- eval $(git for-each-ref --shell bash --format 'if [ $CI_COMMIT_SHA == %(objectname) ]; then git checkout -B %(refname:strip=3); git push --follow-tags github %(refname:strip=3); fi;' $GITHUB_PUSH_REFS)
esp32_demo:
extends:
- .esp_sr_build_template
script:
# replace submodule esp-idf to internal repository to speedup cloning
- commit_str=$(awk '/commit:/{print $0}' module_config/module_esp32_default/IDF_VERSION)
- branch_str=$(awk '/branch:/{print $0}' module_config/module_esp32_default/IDF_VERSION)
- git clone -b ${branch_str#*branch:} ${GITLAB_SSH_SERVER}/espressif/esp-idf.git
- cd esp-idf
- git checkout ${commit_str#*commit:}
# (the same regular expressions are used to set these are used in 'only:' sections below
- source ./tools/ci/configure_ci_environment.sh
- tools/idf_tools.py --non-interactive install && eval "$(tools/idf_tools.py --non-interactive export)" || exit 1
# fetch the submodules (& if necessary re-fetch repo) from gitlab
- time ./tools/ci/get-full-sources.sh
- git submodule update --init
- pip install -r requirements.txt
- cd -
- cd examples/at_sdio_host/ESP32
- idf.py build
- cd -
- cd examples/at_spi_master/sdspi/ESP32
- idf.py build
- cd -
doc_build_html_en:
stage: build
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.0:2-2
image: $ESP_DOCS_ENV_IMAGE
tags:
- build_docs
needs: []
@ -447,11 +45,11 @@ doc_build_html_en:
- ./check_doc_chars.py
- pip install -r requirements.txt
# build html
- build-docs -t {esp32,esp32c2,esp32c3} -l en -bs html
- build-docs -t esp32 -l en -bs html
doc_build_html_cn:
stage: build
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.0:2-2
image: $ESP_DOCS_ENV_IMAGE
tags:
- build_docs
needs: []
@ -467,12 +65,12 @@ doc_build_html_cn:
- ./check_doc_chars.py
- pip install -r requirements.txt
# build html
- build-docs -t {esp32,esp32c2,esp32c3} -l zh_CN -bs html
- build-docs -t esp32 -l zh_CN -bs html
# Separate PDF build and HTML build due to artifacts size limit.
doc_build_pdf_en:
stage: build
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.0:2-2
image: $ESP_DOCS_ENV_IMAGE
tags:
- build_docs
needs: []
@ -488,11 +86,11 @@ doc_build_pdf_en:
- ./check_doc_chars.py
- pip install -r requirements.txt
# build pdf
- build-docs -t {esp32,esp32c2,esp32c3} -l en -bs latex
- build-docs -t esp32 -l en -bs latex
doc_build_pdf_cn:
stage: build
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.0:2-2
image: $ESP_DOCS_ENV_IMAGE
tags:
- build_docs
needs: []
@ -508,11 +106,11 @@ doc_build_pdf_cn:
- ./check_doc_chars.py
- pip install -r requirements.txt
# build pdf
- build-docs -t {esp32,esp32c2,esp32c3} -l zh_CN -bs latex
- build-docs -t esp32 -l zh_CN -bs latex
.deploy_docs_template:
stage: deploy_docs
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.0:2-2
image: $ESP_DOCS_ENV_IMAGE
tags:
- deploy
needs:
@ -545,10 +143,13 @@ deploy_docs_preview:
deploy_docs_production:
extends:
- .deploy_docs_template
only:
# only:
# refs:
# - master
# - /^release\/v.*$/
except:
refs:
- master
- /^release\/v.*$/
variables:
TYPE: "production"
DOCS_BUILD_DIR: "${CI_PROJECT_DIR}/docs/_build/"

View File

@ -1,6 +1,6 @@
var DOCUMENTATION_VERSIONS = {
DEFAULTS: { has_targets: false,
supported_targets: [ "esp32c2" ]
supported_targets: [ "esp32s3" ]
},
VERSIONS: [
// latest

View File

@ -22,7 +22,7 @@ if sys.version_info[0] == 2:
sys.setdefaultencoding('utf-8')
# allowed characters, include some chinese characters, symbol, and punctuation
at_allowed_chars_list = ['中文', '®', '', '', '', '', '', '×', '', '', '', '', '']
at_allowed_chars_list = ['中文', '®', '', '', '', '', '', '×', '', '', '', '', '',"±","°"]
at_not_allowed_chars_list = re.compile(b'[^\x0a\x0d\x20-\x7e]')
at_file_white_list = ['index_of_abbreviations.rst']

View File

@ -1,6 +1,8 @@
Acoustic Algorithm Introduction
===============================
:link_to_translation:`zh_CN:[中文]`
Acoustic algorithms provided in esp-sr include voice activity detection(VAD), adaptive gain control (AGC), acoustic echo cancellation (AEC),noise suppression (NS), and mic-array speech enhancement (MASE). VAD, AGC, AEC, and NS are supported with either single-mic and multi-mic development board, MASE is supported with multi-mic board only.
VAD

View File

@ -1,5 +1,7 @@
Espressif Microphone Design Guidelines
======================================
=======================================
:link_to_translation:`zh_CN:[中文]`
This document provides microphone design guidelines and suggestions for the ESP32-S3 series of audio development boards.

View File

@ -59,8 +59,8 @@ The workflow is as follows:
#. Use **ESP_AFE_VC_HANDLE** to create and initialize AFE (``voice_communication_init`` needs to be configured as true)
#. AFE feed: Input audio data and will run AEC in the feed function
#. Internal: BSS/NS algorithm processing will be carried out. If its dual MIC, the miso algorithm processing will be carried out later.
#. AFE fetch: Return the audio data and the related information after processing. The AGC algorithm processing will be carried out. And the specific gain depends on the config of ``afe_config_t`` structure. If its dual MIC, the NS algorithm processing will be carried out before AGC.
#. Internal: BSS/NS algorithm processing will be carried out. If it's dual MIC, the miso algorithm processing will be carried out later.
#. AFE fetch: Return the audio data and the related information after processing. The AGC algorithm processing will be carried out. And the specific gain depends on the config of ``afe_config_t`` structure. If it's dual MIC, the NS algorithm processing will be carried out before AGC.
.. note ::
``wakenet_Init`` and ``voice_communication_Init`` cannot be configured to true at the same time
@ -76,7 +76,7 @@ Select AFE Handle
~~~~~~~~~~~~~~~~~
Espressif AFE supports both single MIC and dual MIC scenarios, and the algorithm module can be flexibly configured. The internal task of single MIC applications is processed by NS, and the internal task of dual MIC applications is processed by BSS. If the dual microphone scenario is configured for voice communication
(i.e. ``wakenet_init=false, voice_communication_init=true``), the miso internal task will be added.
(i.e. ``wakenet_init=false, voice_communication_init=true``), the miso internal task will be added.
For the acquisition of AFE handle, there is a slight difference between speech recognition scenario and voice communication scenario:
@ -248,7 +248,7 @@ Users can adjust the switch of each algorithm module and its corresponding param
- vad_mode: The VAD operating mode. The bigger, the more radical.
- wakenet_model_name: Its default value is NULL in macro ``AFE_CONFIG_DEFAULT()``. At first, you need to choose WakeNet model through ``idf.py menuconfig``. Then you need to assign a specific model name to this place before ``afe_handle->create_from_config``. The type of value is string. Please refer to`flash_model <../flash_model/README.md>`__
- wakenet_model_name: Its default value is NULL in macro ``AFE_CONFIG_DEFAULT()``. At first, you need to choose WakeNet model through ``idf.py menuconfig``. Then you need to assign a specific model name to this place before ``afe_handle->create_from_config``. The type of value is string. Please refer to `flash_model <../flash_model/README.md>`__
.. note::
In the example, we use the ``esp_srmodel_filter()`` to get wakenet_model_name. If you choose the multiple wakenet models coexist through menuconfig, this function will return a model name randomly.
@ -288,7 +288,7 @@ Users can adjust the switch of each algorithm module and its corresponding param
- pcm_config: Configure according to the audio that fed by ``afe->feed()``. This structure has three member variables to configure:
- total_ch_num: Total number of audio channelstotal_ch_num = mic_num + ref_num。
- total_ch_num: Total number of audio channels, total_ch_num = mic_num + ref_num.
- mic_num: The number of microphone channels. It only can be set to 1 or 2.
@ -407,7 +407,7 @@ When users need to perform other operations after wake-up, such as offline or on
Users can call ``afe_handle->disable_wakenet(afe_data)`` to stop WakeNet, or call ``afe_handle->enable_wakenet(afe_data)`` to enable WakeNet.
In addition, ESP32S3 chip supports switching between wakenet words. (Note: ESP32 chip only supports one wake-up word and does not support switching). After AFE initialization, the ESP32S3 can switch wakenet word by ``afe_handle->set_wakenet()``. For example, ``afe_handle->set_wakenet(afe_data, “wn9_hilexin”)`` can switch to the “Hi Lexin”. How to configure multiple wakenet words, please refer to: `flash_model <../flash_model/README.md>`__
In addition, ESP32S3 chip supports switching between wakenet words. (Note: ESP32 chip only supports one wake-up word and does not support switching). After AFE initialization, the ESP32S3 can switch wakenet word by ``afe_handle->set_wakenet()``. For example, ``afe_handle->set_wakenet(afe_data, "wn9_hilexin")`` can switch to the "Hi Lexin". How to configure multiple wakenet words, please refer to: `flash_model <../flash_model/README.md>`__
Usage Of AEC
~~~~~~~~~~~~~

View File

@ -74,7 +74,7 @@ ESP32 supports:
- None
- chinese single recognition (MultiNet2)
ESP32S3 支持:
ESP32S3 supports:
- None
@ -88,7 +88,7 @@ English Speech Commands Recognition model selection.
This option does not support ESP32.
ESP32S3 Supports
ESP32S3 Supports:
- None

View File

@ -1,29 +1,32 @@
:link_to_translation:`zh_CN:[中文]`
这里是乐鑫 `ESP-SR <https://github.com/espressif/esp-sr>` 本文档将介绍乐鑫以 ESP32 系列芯片为基础推出的AI语音解决方案。从前端音频处理到语音命令词识别从硬件设计建议到性能测试方法全面介绍乐鑫在AI语音方面的系统性工作为用户在乐鑫 ESP32 系列芯片及开发板上构建 AIoT 应用,提供有力参考。
This is LEXIN `ESP-SR <https://github.com/espressif/esp-sr>` This document will introduce LEXIN's AI voice solution based on ESP32 series chip. From front-end audio processing, to voice command word recognition, from hardware design suggestions, to performance testing methods, it is a comprehensive introduction to Loxin's systematic work on AI speech, and provides a strong reference for users to build AIoT applications on Loxin ESP32 series chips and development boards.
乐鑫 AFE 算法已通过亚马逊 Alexa 内置设备的 Software Audio Front-End 认证。可在语音通话和语音识别等场景下提供高质量音频输入。AFE算法中内置的唤醒模块可实现本地语音唤醒功能且支持唤醒词定制。乐鑫语音命令词识别模型可支持最多200条中英文命令词且可在运行中修改命令词为应用带来极大灵活性。
Lexin AFE algorithm has passed the Software Audio Front-End certification for Amazon Alexa built-in devices. The built-in wake-up module in AFE algorithm can realize local voice wake-up function and support wake-up word customization. Lexin's voice command word recognition model can support up to 200 English and Chinese command words, and the command words can be modified during operation, bringing great flexibility to the application.
基于多年硬件设计与开发经验乐鑫可为客户提供语音开发板Review服务并乐意为客户自制开发板进行测试和调优以展现算法最优性能。客户也可按照乐鑫提供的测试方式和自测结果对开发板和整机产品进行深入评估。
Based on years of hardware design and development experience, Loxin can provide voice development board review service for customers, and will be happy to test and tune the development board for customers to show the optimal performance of the algorithm. Customers can also conduct in-depth evaluation of the development board and the whole product according to the test methods and self-test results provided by Loxin.
.. only:: html
**本文档仅包含针对 芯片的 ESP-AT 使用**。如需了解其他芯片,请在页面左上方的下拉菜单中选择您的目标芯片。
**This document only contains the ESP-AT usage** for the chip. For other chips, please select your target chip from the drop-down menu at the top left of the page.
.. only:: latex
**本文档仅包含针对 芯片的 ESP-AT 使用**。
**This document contains ESP-AT usage** for the chip only.
.. toctree::
:hidden:
入门 <acoustic_algorithm/README>
麦克风设计指南 <audio_front_end/Espressif_Microphone_Design_Guidelines>
AFE 声学前端算法 <audio_front_end/README>
模型存放方式 <flash_model/README>
性能测试 <performance_test/README>
语音指令 <speech_command_recognition/README>
唤醒词模型 <wake_word_engine/README>
唤醒词模型 <wake_word_engine/ESP_Wake_Words_Customization>
AFE acoustic front-end algorithm <audio_front_end/README>
Wake word model <wake_word_engine/README>
Customized wake words <wake_word_engine/ESP_Wake_Words_Customization>
Speech commands <speech_command_recognition/README>
Acoustic algorithm introduction <acoustic_algorithm/README>
Model loading method <flash_model/README>
Microphone Design Guidelines <audio_front_end/Espressif_Microphone_Design_Guidelines>
Test Reports <test_report/README>
Performance Testing <performance_test/README>
* :ref:`genindex`
Translated with www.DeepL.com/Translator (free version)

View File

@ -1,6 +1,8 @@
Performance Test
================
:link_to_translation:`zh_CN:[中文]`
AFE
---

View File

@ -1,6 +1,8 @@
MultiNet Introduction
=====================
:link_to_translation:`zh_CN:[中文]`
MultiNet is a lightweight model designed to realize speech commands
recognition offline on ESP32 series. Now, up to 200 speech commands,
including customized commands, are supported.
@ -25,7 +27,6 @@ characters or English words.
The following table shows the model support of Espressif SoCs:
<<<<<<< HEAD
+---------+-----------+-------------+---------------+-------------+
| Chip | ESP32 | ESP32S3 |
+=========+===========+=============+===============+=============+
@ -35,12 +36,6 @@ The following table shows the model support of Espressif SoCs:
+---------+-----------+-------------+---------------+-------------+
| English | | | | √ |
+---------+-----------+-------------+---------------+-------------+
=======
.. figure:: ../../_static/MultiNet_model.png
:alt: multinet_model
multinet_model
>>>>>>> 7c465343973cd5291b534f75bae9a6f2fc6465d8
.. note::
Note: the model ending with Q8 represents the 8bit version of the model, means more lightweight.
@ -66,7 +61,7 @@ Requirements of speech commands
- Mixed Chinese and English is not supported in command words
- Currently, up to 200 command words are supported
- The command word cannot contain Arabic numerals and special characters
- Avoid common command words like “hello”
- Avoid common command words like "hello"
- The greater the pronunciation difference of each Chinese character / word in the command word, the better the performance
Speech commands customization method
@ -82,13 +77,13 @@ Speech commands string need to meet specific formats, as follows:
- Chines
Chinese speech commands need to use Chinese Pinyin, and there should be a space between the Pinyin spelling of each word. For example, “打开空调” should be written as “da kai kong tiao”, “打开绿色灯” should be written as “da kai lv se deng”.
Chinese speech commands need to use Chinese Pinyin, and there should be a space between the Pinyin spelling of each word.
In addition, we also provide corresponding tools for users to convert Chinese characters into pinyin. See details:
- English
English speech commands need to be represented by specific phonetic symbols. The phonetic symbols of each word are separated by spaces, such as “turn on the light”, which needs to be written as “TkN nN jc LiT”.
English speech commands need to be represented by specific phonetic symbols. The phonetic symbols of each word are separated by spaces, such as "turn on the light", which needs to be written as "TkN nN jc LiT".
**We provide specific conversion rules and tools. For details, please refer to the English G2P** `tool <../../tool/multinet_g2p.py>`__.
@ -108,7 +103,7 @@ Here we provide two methods of adding speech commands:
menuconfig_add_speech_commands
Please note that a single ``Command ID`` can support multiple phrases. For example, “da kai kong tiao” and “kai kong tiao” have the same meaning, you can write them in the entry corresponding to the same command ID, and separate the adjacent entries with the English character “,” without spaces before and after “,”.
Please note that a single ``Command ID`` can support multiple phrases. For example, "da kai kong tiao" and "kai kong tiao" have the same meaning, you can write them in the entry corresponding to the same command ID, and separate the adjacent entries with the English character "," without spaces before and after ",".
Then call the following API:
@ -149,7 +144,7 @@ Run speech commands recognition
Speech commands recognition needs to be run together with the audio front-end (AFE) in esp-sr (WakeNet needs to be enabled in AFE). For the use of AFE, please refer to the document:
`AFE 介绍及使用 <../audio_front_end/README_CN.md>`__
`AFE Introduction and Use <../audio_front_end/README_CN.md>`__
MultiNet Initialization
~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -0,0 +1,4 @@
Test Methods and Test Reports
==============================
:link_to_translation:`zh_CN:[中文]`

View File

@ -1,10 +1,12 @@
Espressif Speech Wake-up Solution Customization Process
========================================================
:link_to_translation:`zh_CN:[中文]`
Speech Wake Word Customization Process
---------------------------------------
Espressif provides users with the offline wake word customization service, which allows users to use both publicly available wake words (such as “Hi Lexin”, ”Alexa”, and “hi,ESP”) and customized wake words.
Espressif provides users with the offline wake word customization service, which allows users to use both publicly available wake words (such as "Hi Lexin", "Alexa", and "hi,ESP") and customized wake words.
#. If you want to use publicly available wake words for commercial use
@ -24,7 +26,7 @@ Espressif provides users with the offline wake word customization service, which
- Otherwise
- Espressif will collect and provide all the training corpus;
- Espressif will deliver a static library file of successfully trained wake word to you, but wont share the corpus;
- Espressif will deliver a static library file of successfully trained wake word to you, but won't share the corpus;
- It will take around three weeks to collect and train the corpus;
- Espressif will charge training fees (corpus collecting fees included) based on the scale of your production.
@ -58,7 +60,7 @@ As mentioned above, you can provide your own training corpus for Espressif. Belo
- The whole product is strongly recommended.
- The development board of your product also works when there is no cavity structure.
- Record in 16 kHz, and dont use **resampling**.
- Record in 16 kHz, and don't use **resampling**.
- At the recording site, pay attention to the impact of reverberation interference in a closed environment.
- Collect samples with multiple recording devices at the same time (recommended).

View File

@ -1,15 +1,18 @@
wakeNet
========
wakeNet, which is a wake word engine built upon neural network, is
specially designed for low-power embedded MCUs. Now, the wakeNet model
supports up to 5 wake words.
:link_to_translation:`zh_CN:[中文]`
wakeNet, which is a wake word engine built upon neural network, is specially designed for low-power embedded MCUs. Now, the wakeNet model supports up to 5 wake words.
Overview
--------
Please see the flow diagram of wakeNet below:
.. figure:: ../../_static/wakenet_workflow.png
:alt: overview
.. raw:: html
<center>
@ -20,11 +23,8 @@ Please see the flow diagram of wakeNet below:
- speech features:
<<<<<<< HEAD
We use the `MFCC <https://en.wikipedia.org/wiki/Mel-frequency_cepstrum>`__ method to extract speech spectrum features. The sampling rate of the input audio file is 16KHz, mono, and the encoding mode is signed 16-bit. The window width and step size of each frame are 30ms.
=======
我们使用 `MFCC <https://en.wikipedia.org/wiki/Mel-frequency_cepstrum>`__ 方法提取语音频谱特征。输入的音频文件采样率为16KHz单声道编码方式为signed 16-bit。每帧窗宽和步长均为30ms。
>>>>>>> 7c465343973cd5291b534f75bae9a6f2fc6465d8
We use `MFCC <https://en.wikipedia.org/wiki/Mel-frequency_cepstrum>`__ method to extract the speech spectrum features. The input audio file has a sample rate of 16KHz, mono, and is encoded as signed 16-bit. each frame has a window width and step size of 30ms.
- Speech Feature:
@ -72,11 +72,11 @@ Use wakeNet
- How to select the wakeNet model
Please refer to `flash model <../flash_model/README.md>`__.
Please refer to `flash model <../flash_model/README.rst>`__.
- How to run wakeNet
wakeNet is currently included in the `AFE <../audio_front_end/README.md>`__, which is running by default, and returns the detect results through the AFE fetch interface.
wakeNet is currently included in the `AFE <../audio_front_end/README.rst>`__, which is running by default, and returns the detect results through the AFE fetch interface.
If users do not wants to initialize WakeNet, please use:
@ -94,9 +94,9 @@ Use wakeNet
Performance Test
----------------
Please refer to `Performance Test <../performance_test/README.md>`__.
Please refer to `Performance Test <../performance_test/README.rst>`__.
Wake Word Customization
-----------------------
For details on how to customize your wake words, please see `Espressif Speech Wake Word Customization Process <ESP_Wake_Words_Customization.md>`__.
For details on how to customize your wake words, please see `Espressif Speech Wake Word Customization Process <ESP_Wake_Words_Customization.rst>`__.

View File

@ -138,18 +138,21 @@
唤醒率测试
-----------
+----------------+------------+---------------+-----------+-------------+-------------+--------+--------+
+----------------+------------+-------------+-----------+-----------+-----------+--------+--------+
| 测试项 | 环境噪声 | 噪声指标 | 信噪比SNR | 角度 | 距离 | 唤醒率 | 识别率 |
+================+============+===============+===========+=============+=============+========+========+
| 本地唤醒率测试 | 安静 | - 人声59dBA | NA | - 人声90° | - 人声3米 | 99% | 91.5% |
| | | - 噪声NA | | - 噪声45° | - 噪声2米 | | |
| +------------+---------------+-----------+ + +--------+--------+
| | 白噪声 | - 人声59dBA | ≥4dBA | | | 99% | 78.25% |
| | | - 噪声55dBA | | | | | |
| +------------+---------------+-----------+ + +--------+--------+
| | 人声类噪声 | - 人声59dBA | ≥4dBA | | | 99% | 82.77% |
| | | - 噪声55dBA | | | | | |
+----------------+------------+---------------+-----------+-------------+-------------+--------+--------+
+================+============+=============+===========+===========+===========+========+========+
| 本地唤醒率测试 | 安静 | 人声59dBA | NA | 人声90° | 人声3米 | 99% | 91.5% |
| | | | | | | | |
| | | 噪声NA | | 噪声45° | 噪声2米 | | |
| +------------+-------------+-----------+ | +--------+--------+
| | 白噪声 | 人声59dBA | ≥4dBA | | | 99% | 78.25% |
| | | | | | | | |
| | | 噪声55dBA | | | | | |
| +------------+-------------+-----------+ | +--------+--------+
| | 人声类噪声 | 人声59dBA | ≥4dBA | | | 99% | 82.77% |
| | | | | | | | |
| | | 噪声55dBA | | | | | |
+----------------+------------+-------------+-----------+-----------+-----------+--------+--------+
误唤醒测试
-----------
@ -168,11 +171,11 @@
+----------------+----------+---------------+-----------+--------+--------------+
| 测试项 | 环境噪声 | 噪声指标 | 信噪比SNR | 唤醒率 | 命令词识别率 |
+================+==========+===============+===========+========+==============+
| 唤醒打断率测试 | 音乐 | - 人声59dBA | ≥-10dBA | 100% | 96% |
| | | - 噪声69dBA | | | |
| 唤醒打断率测试 | 音乐 | 人声59dBA | ≥ 10dBA | 100% | 96% |
| | | 噪声69dBA | | | |
| +----------+---------------+-----------+--------+--------------+
| | TTS | - 人声59dBA | ≥-10dBA | 100% | 96% |
| | | - 噪声69dBA | | | |
| | TTS | 人声59dBA | ≥ 10dBA | 100% | 96% |
| | | 噪声69dBA | | | |
+----------------+----------+---------------+-----------+--------+--------------+
响应时间测试
@ -181,8 +184,8 @@
+--------------+----------+---------------+------------+----------+
| 测试项 | 环境噪声 | 噪声指标 | 信噪比 SNR | 响应时间 |
+==============+==========+===============+============+==========+
| 响应时间测试 | 安静 | - 人声59dBA | NA | <500 ms |
| | | - 噪声NA | | |
| 响应时间测试 | 安静 | 人声59dBA | NA | <500 ms |
| | | 噪声NA | | |
+--------------+----------+---------------+------------+----------+
.. figure:: ../../_static/test_response_time.png

View File

@ -1,5 +1,5 @@
WakeNet
=======
========
:link_to_translation:`en:[English]`