当前位置:网站首页>[004] [esp32 Development Notes] audio development framework ADF environment construction - based on esp-idf

[004] [esp32 Development Notes] audio development framework ADF environment construction - based on esp-idf

2022-06-09 04:32:00 Cauchy's hesitation

ESP32
Development Notes
ADF Environment building
patch up
Common errors and configurations

1 ADF Environment building

stay ESP-IDF Environment ESP-ADF Environmental Science

image-20220406212603129

After successful installation , Several library files are missing and not installed , They are embedded esp-idfesp-idf-libs(adf Audio library )、esp-sr(adf Speech recognition library ), Because these libraries are esp-idf-master Warehouse The following are all branches branch Stored as a link .

  • Libraries that need to be installed separately

Method 1

image-20220406213346244
image-20220406232619440

Copy these files to respectively ..\esp-adf\esp-idf..\esp-adf\components\esp-adf-libs..\esp-adf\components\esp-sr In the folder .

Method 2 : use git Command clone warehouse :

  1. stay esp-adf-libs Execute under directory :
git clone https://gitclone.com/github.com/espressif/esp-adf-libs
  1. stay esp-sr Execute under directory :
git clone https://gitclone.com/github.com/espressif/esp-sr.git

git Cloned esp-sr The library files , Some documents are missing after my test , Error will be reported in compilation , Later, it can be downloaded and copied directly in the official warehouse .

  1. stay esp-idf Execute under directory :
git clone https://gitclone.com/github.com/espressif/esp-idf
  1. After downloading the above warehouse , modify adf Under the table of contents .gitmodules Is as follows :
    image-20220406234259675
[submodule "esp-idf"]
	path = esp-idf
	url = https://gitclone.com/github.com/espressif/esp-idf
[submodule "components/esp-adf-libs"]
	path = components/esp-adf-libs
	url = https://gitclone.com/github.com/espressif/esp-adf-libs
[submodule "components/esp-sr"]
	path = components/esp-sr
	url = https://gitclone.com/github.com/espressif/esp-sr.git

When the two warehouses are downloaded , stay adf Under the table of contents cmd perform git submodule update --init, This step switches the two sub modules to the current mode ADF Required version .

  • Add environment variables

Method 1 : stay Command Promp Run the following command in :

set ADF_PATH=D:\ESP-IDF\esp-adf

ADF_PATH by ADF Library installation path

Method 2 : Get into git bash Of vim The editor enters the following command :

export IDF_PATH="D:\ESP-IDF\esp-adf"

Press... When input is complete ESC key , Then input :wq Click enter .

Method 3 : Manually add :
image-20220406234259675
If you don't add environment variables , You can directly use the path where the library is located :

include(D:/ESP-IDF/esp-iot-solution/component.cmake)	
include($ENV{IOT_SOLUTION_PATH}/component.cmake)
  • stay ESP-IDF Add... To plug-in settings ADF The installation path
    image-20220527015458010
  • Select the development board corresponding to the chip model HAL library ( My is ESP32-S2
    image-20220407191505343

compile demo test :
image-20220406234259675


Reference resources :

2 patch up

Because we have chosen by default to psram Audio task stack running on , This means that you need to apply a patch $ADF_PATH/idf_patches/idf_v4.4_freertos.patch To support this feature .(4.4 And IDF Version guarantee consistency )

stay esp-idf Right click under the path git-bash-here Input :

git apply ./idf_v4.4_freertos.patch

3 Common errors and configurations

  1. error:esp-adf/components/audio_board/lyrat_v4_3/board_pins_config.c
  1. esp-iot-solution The code framework :unknown type name ‘i2s_dac_mode_t’
  1. https The link needs to be authenticated with a certificate
     Insert picture description here
     Insert picture description here
  2. AAC Decoding failed , modify Menuconfig
     Insert picture description here
    To run AAC decoder , System task tick time CONFIG_FREERTOS_HZ Should be set to 1000 Hz:
     Insert picture description here

END

原网站

版权声明
本文为[Cauchy's hesitation]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206090432064982.html