Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dureos compilation errors and questions (AUD-5658) #1261

Closed
AaronPMM opened this issue Sep 1, 2024 · 7 comments
Closed

dureos compilation errors and questions (AUD-5658) #1261

AaronPMM opened this issue Sep 1, 2024 · 7 comments

Comments

@AaronPMM
Copy link

AaronPMM commented Sep 1, 2024

Environment:
Audio development kit: ESP32-S3-BOX-3
IDF version:5,3 (windows)
ADF version:v2.6-167-ge27cd526

Error description:
As shown in the figure below:

esp-error2

It seems that duer_profile does not have permission.The document states that the requested profile file should be placed in ADF_PATH/components/dueros_service/duer_profile. In the original SDK, duer_profile is a file instead of a folder, so I deleted it and created a duer_profile folder and placed the profile in it.

I don't know if this is the reason, if so, what kind of permissions are required?

In addition, the document states that tone/dingding.wav in the example needs to be copied to microSD, but there is no place to insert the SDK on ESP32-S3-BOX-3. How can I solve this problem?

@github-actions github-actions bot changed the title dureos compilation errors and questions dureos compilation errors and questions (AUD-5658) Sep 1, 2024
@JosephTang
Copy link
Contributor

Hi ~ @AaronPMM,
duer_profile should be a file. When got your profile from baidu, copy the profile's content into the duer_profile, after that, select Generate the nvs partition which include the profile of dueros in menuconfig, a python script will be run to generate a bin, you can also select flash the generated nvs partition to flash the bin with the idf.py flash command.

No additional permissions required for this file.

esp-box-3 has no sdcard slot. so you can make the tone/dingding.wav as a flash_tone.
A tool mk_audio_tong.py shows how to make a flash_tone binary.
A example wwe and its CMakeLists.txt show how to flash and use this bin.

@AaronPMM
Copy link
Author

AaronPMM commented Sep 2, 2024

Hi ~ @AaronPMM, duer_profile should be a file. When got your profile from baidu, copy the profile's content into the duer_profile, after that, select Generate the nvs partition which include the profile of dueros in menuconfig, a python script will be run to generate a bin, you can also select flash the generated nvs partition to flash the bin with the idf.py flash command.

No additional permissions required for this file.

esp-box-3 has no sdcard slot. so you can make the tone/dingding.wav as a flash_tone. A tool mk_audio_tong.py shows how to make a flash_tone binary. A example wwe and its CMakeLists.txt show how to flash and use this bin.

The duer_profile file I downloaded is a zip package. According to the description in the document (dueros/README_CN.md), duer_profile should be a folder instead of a file.

关于如何添加 DuerOS 数据点,请参考 issue #145

此外,本例程还需 DuerOS 的 profile,用户可自行前往 百度 DuerOS 开放平台 页面进行申请,并且将申请到的 profile 替换 ADF_PATH/components/dueros_service/duer_profile 文件夹下的原始空文件。

@JosephTang
Copy link
Contributor

The DuerOS example was updated two months ago in the master branch, and this document has also been changed. We will clarify this description in a future version. Thank you for your suggestion. You can replace the content in dueros_profile and rebuild the project.

@AaronPMM
Copy link
Author

AaronPMM commented Sep 2, 2024

The DuerOS example was updated two months ago in the master branch, and this document has also been changed. We will clarify this description in a future version. Thank you for your suggestion. You can replace the content in dueros_profile and rebuild the project.

Current environment:
I have now found a physical machine with Ubuntu 20.04 and changed the previous window environment to Ubuntu environment

Do you mean that duer_profile is a folder instead of a file? I deleted the duer_profile file, created a duer_profile folder, unzipped the profile and copied the content files to the duer_profile folder. The compilation prompted an error again. It was an open error. So duer_profile is a file, and the document does not describe the application profile in detail. So what should duer_profile be? How to apply for it?

Also, there should be sdcard initialization in the example, but esp32-s3-box-3 hardware does not have sdcard . Even if the compilation is successful, the program will not run normally due to sdcard initialization. Do you have any suggestions?

error:
/home/aaron/esp/esp-adf/esp-idf/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Executing action: flash
Running ninja in directory /home/aaron/esp/esp-adf/examples/dueros/build
Executing "ninja flash"...
[2/1415] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:


ESP-IDF Partition Table

Name, Type, SubType, Offset, Size, Flags

nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,3136K,
model,data,spiffs,0x320000,4152K,


[3/1415] cd /home/aaron/esp/esp-adf/components/dueros_service && /home/aaron/.espressif/py...eros_service/nvs.csv /home/aaron/esp/esp-adf/examples/dueros/build/duer_profile.bin 0x6000
FAILED: esp-idf/dueros_service/CMakeFiles/duer_profile_bin
cd /home/aaron/esp/esp-adf/components/dueros_service && /home/aaron/.espressif/python_env/idf4.4_py3.8_env/bin/python /home/aaron/esp/esp-adf/esp-idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate /home/aaron/esp/esp-adf/components/dueros_service/nvs.csv /home/aaron/esp/esp-adf/examples/dueros/build/duer_profile.bin 0x6000

Creating NVS binary with version: V2 - Multipage Blob Support Enabled
Traceback (most recent call last):
File "/home/aaron/esp/esp-adf/esp-idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py", line 1025, in
main()
File "/home/aaron/esp/esp-adf/esp-idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py", line 1021, in main
args.func(args)
File "/home/aaron/esp/esp-adf/esp-idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py", line 908, in generate
write_entry(nvs_obj, row['key'], row['type'], row['encoding'], row['value'])
File "/home/aaron/esp/esp-adf/esp-idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py", line 630, in write_entry
with open(abs_file_path, 'rb') as f:
IsADirectoryError: [Errno 21] Is a directory: '/home/aaron/esp/esp-adf/components/dueros_service/duer_profile'
[4/1415] Move and Pack models...
Recommended model partition size: 285K
[6/1415] Generating memory.ld linker script...
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

@JosephTang
Copy link
Contributor

duer_profile is a file. Just copy your profile's content into it.

@AaronPMM
Copy link
Author

AaronPMM commented Sep 2, 2024

duer_profile is a file. Just copy your profile's content into it.

I guess it may be that I rename any file in the compression package to duer_profile. I am trying it, but now after the program is downloaded to the hardware, it has not been working properly. The error is as follows:
I (137356) SDCARD: Using 1-line SD mode, base path=/sdcard
I (137366) gpio: GPIO[11]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (137366) gpio: GPIO[14]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (137376) gpio: GPIO[9]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 E (137426) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107 E (137426) vfs_fat_sdmmc: sdmmc_card_init failed (0x107). in place. W (137436) AUDIO_EVT: There is no space in external queue E (137446) PERIPH_SDCARD: mount sdcard error! I (138356) SDCARD: Using 1-line SD mode, base path=/sdcard I (138356) gpio: GPIO[11]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (138356) gpio: GPIO[14]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (138366) gpio: GPIO[9]| down: 0| Intr:0 E (138436) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107 E (138436) vfs_fat_sdmmc: sdmmc_card_init failed (0x107). E (138436) SDCARD: Failed to initialize the card (263). Make sure SD card lines have pull-up resistors in place. W (138446) AUDIO_EVT: There is no space in external queue E (138446) PERIPH_SDCARD: mount sdcard error!

So I should cancel the initialization of sdcard, then how should I modify this music to replace the original function?

@shootao
Copy link

shootao commented Sep 5, 2024

same as issues/1264, plaese close this Issue

@AaronPMM AaronPMM closed this as completed Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants