From 0981bc8425d6cace35ebb73789265a1c2e14dc92 Mon Sep 17 00:00:00 2001 From: LiJunu Date: Wed, 16 Nov 2022 18:30:53 +0800 Subject: [PATCH] xci/fix_bug 1.delete yml test by esp-at --- .gitignore | 2 +- .gitlab-ci.yml | 437 +----------------- docs/__pycache__/conf_common.cpython-37.pyc | Bin 1385 -> 1385 bytes docs/_static/js/at_versions.js | 2 +- docs/check_doc_chars.py | 2 +- docs/en/acoustic_algorithm/README.rst | 2 + ...Espressif_Microphone_Design_Guidelines.rst | 4 +- docs/en/audio_front_end/README.rst | 12 +- docs/en/flash_model/README.rst | 4 +- docs/en/index.rst | 33 +- docs/en/performance_test/README.rst | 2 + docs/en/speech_command_recognition/README.rst | 19 +- docs/en/test_report/README.rst | 4 + .../ESP_Wake_Words_Customization.rst | 8 +- docs/en/wake_word_engine/README.rst | 24 +- docs/zh_CN/test_report/README.rst | 39 +- docs/zh_CN/wake_word_engine/README.rst | 2 +- 17 files changed, 105 insertions(+), 491 deletions(-) create mode 100644 docs/en/test_report/README.rst diff --git a/.gitignore b/.gitignore index b80c129..524a616 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ sdkconfig.old sdkconfig model/target/* .vscode -_build/ \ No newline at end of file +docs/_build/* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae16192..99561aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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/" diff --git a/docs/__pycache__/conf_common.cpython-37.pyc b/docs/__pycache__/conf_common.cpython-37.pyc index ffe1ee93b6c0d4df2b78768b554f3e68a914b368..11c070f0d72a0e910fd8e16c3a57407e030532aa 100644 GIT binary patch delta 37 qcmaFK^^%LriI3jn4H2create_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 channels,total_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 ~~~~~~~~~~~~~ diff --git a/docs/en/flash_model/README.rst b/docs/en/flash_model/README.rst index e0fb0e2..04927f0 100644 --- a/docs/en/flash_model/README.rst +++ b/docs/en/flash_model/README.rst @@ -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 diff --git a/docs/en/index.rst b/docs/en/index.rst index c5518e5..701542c 100644 --- a/docs/en/index.rst +++ b/docs/en/index.rst @@ -1,29 +1,32 @@ :link_to_translation:`zh_CN:[中文]` -这里是乐鑫 `ESP-SR ` 本文档将介绍乐鑫以 ESP32 系列芯片为基础推出的AI语音解决方案。从前端音频处理,到语音命令词识别,从硬件设计建议,到性能测试方法,全面介绍乐鑫在AI语音方面的系统性工作,为用户在乐鑫 ESP32 系列芯片及开发板上构建 AIoT 应用,提供有力参考。 +This is LEXIN `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: - 入门 - 麦克风设计指南 - AFE 声学前端算法 - 模型存放方式 - 性能测试 - 语音指令 - 唤醒词模型 - 唤醒词模型 - -* :ref:`genindex` \ No newline at end of file + AFE acoustic front-end algorithm + Wake word model + Customized wake words + Speech commands + Acoustic algorithm introduction + Model loading method + Microphone Design Guidelines + Test Reports + Performance Testing + +* :ref:`genindex` + +Translated with www.DeepL.com/Translator (free version) \ No newline at end of file diff --git a/docs/en/performance_test/README.rst b/docs/en/performance_test/README.rst index 79a1090..bf80102 100644 --- a/docs/en/performance_test/README.rst +++ b/docs/en/performance_test/README.rst @@ -1,6 +1,8 @@ Performance Test ================ +:link_to_translation:`zh_CN:[中文]` + AFE --- diff --git a/docs/en/speech_command_recognition/README.rst b/docs/en/speech_command_recognition/README.rst index dbbe236..297eaa3 100644 --- a/docs/en/speech_command_recognition/README.rst +++ b/docs/en/speech_command_recognition/README.rst @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/en/test_report/README.rst b/docs/en/test_report/README.rst new file mode 100644 index 0000000..ac0687b --- /dev/null +++ b/docs/en/test_report/README.rst @@ -0,0 +1,4 @@ +Test Methods and Test Reports +============================== + +:link_to_translation:`zh_CN:[中文]` \ No newline at end of file diff --git a/docs/en/wake_word_engine/ESP_Wake_Words_Customization.rst b/docs/en/wake_word_engine/ESP_Wake_Words_Customization.rst index 23e8021..bfff47e 100644 --- a/docs/en/wake_word_engine/ESP_Wake_Words_Customization.rst +++ b/docs/en/wake_word_engine/ESP_Wake_Words_Customization.rst @@ -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 won’t 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 don’t 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). diff --git a/docs/en/wake_word_engine/README.rst b/docs/en/wake_word_engine/README.rst index 7c81fb9..95c0a94 100644 --- a/docs/en/wake_word_engine/README.rst +++ b/docs/en/wake_word_engine/README.rst @@ -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
@@ -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 `__ 方法提取语音频谱特征。输入的音频文件采样率为16KHz,单声道,编码方式为signed 16-bit。每帧窗宽和步长均为30ms。 ->>>>>>> 7c465343973cd5291b534f75bae9a6f2fc6465d8 + We use the `MFCC `__ 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. + We use `MFCC `__ 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 `__. +For details on how to customize your wake words, please see `Espressif Speech Wake Word Customization Process `__. diff --git a/docs/zh_CN/test_report/README.rst b/docs/zh_CN/test_report/README.rst index 3847f8e..2781e21 100644 --- a/docs/zh_CN/test_report/README.rst +++ b/docs/zh_CN/test_report/README.rst @@ -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 | | | | | | -+----------------+------------+---------------+-----------+-------------+-------------+--------+--------+ ++----------------+------------+-------------+-----------+-----------+-----------+--------+--------+ +| 测试项 | 环境噪声 | 噪声指标 | 信噪比SNR | 角度 | 距离 | 唤醒率 | 识别率 | ++================+============+=============+===========+===========+===========+========+========+ +| 本地唤醒率测试 | 安静 | 人声: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 diff --git a/docs/zh_CN/wake_word_engine/README.rst b/docs/zh_CN/wake_word_engine/README.rst index 6edbc84..891758a 100644 --- a/docs/zh_CN/wake_word_engine/README.rst +++ b/docs/zh_CN/wake_word_engine/README.rst @@ -1,5 +1,5 @@ WakeNet -======= +======== :link_to_translation:`en:[English]`