Skip to content

Commit

Permalink
WIP: read wake volume
Browse files Browse the repository at this point in the history
This requires modifications to ESP-ADF, so we need to bump it to a newer
version.
  • Loading branch information
stintel committed Sep 8, 2023
1 parent 985e8ec commit d35bb4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ COPY container.gitconfig /root/.gitconfig
ENV PATH="$PATH:/willow/.local/bin"
WORKDIR /willow

ENV ADF_VER="2939a3e541f46f6dd916d2e3b7462609ec4fae5c"
ENV ADF_VER="1ed0196fe4623f5760e512eb851c038cf0785b06"
RUN \
cd /opt/esp/idf && \
curl https://raw.githubusercontent.com/toverainc/esp-adf/$ADF_VER/idf_patches/idf_v4.4_freertos.patch | patch -p1
7 changes: 7 additions & 0 deletions main/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,13 @@ static esp_err_t cb_ar_event(audio_rec_evt_t are, void *data)
if (recording) {
break;
}
float *wake_volume_ptr = (float *)data;
if (wake_volume_ptr == NULL) {
ESP_LOGI(TAG, "wake_volume_ptr is NULL");
} else {
float wake_volume = *wake_volume_ptr;
ESP_LOGI(TAG, "wake volume: %f", wake_volume);
}
reset_timer(hdl_display_timer, DISPLAY_TIMEOUT_US, true);

speech_rec_mode = config_get_char("speech_rec_mode", DEFAULT_SPEECH_REC_MODE);
Expand Down

0 comments on commit d35bb4e

Please sign in to comment.