Git Product home page Git Product logo

Comments (3)

jcampbellco avatar jcampbellco commented on July 25, 2024 1

@BugsTw (and anyone else who finds this issue applies to them) I was able to modify UnitTest.ino to remove the esp_vad.h dependency pretty easily, here's a diff for it (also attached as UnitTest.patch for convenience).

If possible any help figuring out what I've configured incorrectly on PlatformIO or any suggestions there are very much appreciated still! But this at least unblocks me so I can continue to experiment with the T-Deck lol

diff --git a/examples/UnitTest/UnitTest.ino b/examples/UnitTest/UnitTest.ino
index b21cdd8..03d4034 100644
--- a/examples/UnitTest/UnitTest.ino
+++ b/examples/UnitTest/UnitTest.ino
@@ -25,7 +25,6 @@
 #include "es7210.h"
 #include <Audio.h>

 #include <driver/i2s.h>
-#include <esp_vad.h>

 #define TOUCH_MODULES_GT911
 #include "TouchLib.h"
@@ -71,8 +70,6 @@ TFT_eSPI        tft;
 Audio           audio;
 size_t          bytes_read;
 uint8_t         status;
-int16_t         *vad_buff;
-vad_handle_t    vad_inst;
 TaskHandle_t    playHandle = NULL;
 TaskHandle_t    radioHandle = NULL;

@@ -803,34 +800,6 @@ void initBoard()
     i2s_set_pin(I2S_CH, &pin_config);
     i2s_zero_dma_buffer(I2S_CH);

-
-    vad_inst = vad_create(VAD_MODE_0);
-    vad_buff = (int16_t *)malloc(VAD_BUFFER_LENGTH * sizeof(short));
-    if (vad_buff == NULL) {
-        while (1) {
-            Serial.println("Memory allocation failed!");
-            delay(1000);
-        }
-    }
-
-    // Wait until sound is detected before continuing
-    uint32_t c = 0;
-    while (1) {
-        i2s_read(I2S_CH, (char *)vad_buff, VAD_BUFFER_LENGTH * sizeof(short), &bytes_read, portMAX_DELAY);
-        // Feed samples to the VAD process and get the result
-        vad_state_t vad_state = vad_process(vad_inst, vad_buff, VAD_SAMPLE_RATE_HZ, VAD_FRAME_LENGTH_MS);
-        if (vad_state == VAD_SPEECH) {
-            Serial.print(millis());
-            Serial.println("Speech detected");
-            c++;
-            snprintf(buf, 256, "%s:%d\n", "Speech detected", c);
-            addMessage(buf);
-        }
-        if (c >= 5)break;
-        lv_task_handler();
-        delay(5);
-    }
-
     i2s_driver_uninstall(I2S_CH);

     pinMode(BOARD_BOOT_PIN, INPUT);

UnitTest.patch

from t-deck.

Jokymon avatar Jokymon commented on July 25, 2024

This file is part of the Espressif Speech Recognition SDK (https://github.com/espressif/esp-sr/tree/master/include/esp32s3) I would expect it to exist, when you correctly installed your PlatformIO setup before building.

from t-deck.

jcampbellco avatar jcampbellco commented on July 25, 2024

Hi @Jokymon, hoping to get some guidance, I'm experiencing the same issue @BugsTw is, getting an esp_vad.h: No such file or directory error. In my case, it's with a fresh PlatformIO install and an unmodified clone of master, but I receive the same error:

image

Based on your comment that it should be pulled in via the Speech Recognition SDK, I added a line to platformio.ini, under the [env:T-Deck] section lib_deps = https://github.com/espressif/esp-sr.git, resulting in line 39 being added:

image

This pulled the esp-sr lib in, but UnitTest.ino was still reporting a file not found, poking around a bit I changed the #include line to #include <esp32s3/esp_vad.h>:

image

This does resolve the issue of esp_vad.h not being found, but in turn creates 3 new errors from esp-sr itself:

image

At this point I'm a little out of my depth with the dependency resolution happening here. Is this an issue that I'm on a Windows system? I will try and replicate later from my Linux machine.

If you have any suggestions on what this might point to, especially if it's something about my configuration of PlatformIO or anything of that sort, I really appreciate it! If there's any other info I can provide or steps I should take, happy to try and report back with results. Thank you again!

from t-deck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.