mirror of
https://github.com/espressif/esp-sr.git
synced 2025-09-15 15:28:44 +08:00
bugfix(AFE): clean up the warnings and errors
This commit is contained in:
parent
e6f5d5717f
commit
66a12ee570
@ -41,7 +41,7 @@ typedef struct {
|
||||
bool voice_communication_init;
|
||||
vad_mode_t vad_mode; // The value can be: VAD_MODE_0, VAD_MODE_1, VAD_MODE_2, VAD_MODE_3, VAD_MODE_4
|
||||
esp_wn_iface_t *wakenet_model;
|
||||
model_coeff_getter_t *wakenet_coeff;
|
||||
void *wakenet_coeff;
|
||||
det_mode_t wakenet_mode;
|
||||
afe_sr_mode_t afe_mode;
|
||||
int afe_perferred_core;
|
||||
@ -82,8 +82,8 @@ typedef struct {
|
||||
.wakenet_init = true, \
|
||||
.voice_communication_init = false, \
|
||||
.vad_mode = VAD_MODE_3, \
|
||||
.wakenet_model = &WAKENET_MODEL, \
|
||||
.wakenet_coeff = &WAKENET_COEFF, \
|
||||
.wakenet_model = (esp_wn_iface_t *)&WAKENET_MODEL, \
|
||||
.wakenet_coeff = (void *)&WAKENET_COEFF, \
|
||||
.wakenet_mode = DET_MODE_2CH_90, \
|
||||
.afe_mode = SR_MODE_LOW_COST, \
|
||||
.afe_perferred_core = 0, \
|
||||
|
||||
@ -16,17 +16,6 @@ extern const esp_mn_iface_t esp_sr_multinet5_quantized8;
|
||||
Configure wake word to use based on what's selected in menuconfig.
|
||||
*/
|
||||
#if defined CONFIG_USE_MULTINET
|
||||
#if CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION
|
||||
#define MULTINET_MODEL_EN esp_sr_multinet5_quantized
|
||||
#define MULTINET_COEFF_EN "mn5en"
|
||||
#define MULTINET_MODEL esp_sr_multinet5_quantized
|
||||
#define MULTINET_COEFF "mn5en"
|
||||
#elif CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8
|
||||
#define MULTINET_MODEL_EN esp_sr_multinet5_quantized8
|
||||
#define MULTINET_COEFF_EN "mn5q8en"
|
||||
#define MULTINET_MODEL esp_sr_multinet5_quantized8
|
||||
#define MULTINET_COEFF "mn5q8en"
|
||||
#endif
|
||||
|
||||
#if CONFIG_SR_MN_CN_MULTINET2_SINGLE_RECOGNITION
|
||||
#include "multinet2_ch.h"
|
||||
@ -45,6 +34,23 @@ extern const esp_mn_iface_t esp_sr_multinet5_quantized8;
|
||||
#define MULTINET_MODEL esp_sr_multinet4_single_quantized_cn
|
||||
#define MULTINET_COEFF "mn4_5cn"
|
||||
#endif
|
||||
|
||||
#if CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION
|
||||
#define MULTINET_MODEL_EN esp_sr_multinet5_quantized
|
||||
#define MULTINET_COEFF_EN "mn5en"
|
||||
#ifndef MULTINET_MODEL
|
||||
#define MULTINET_MODEL esp_sr_multinet5_quantized
|
||||
#define MULTINET_COEFF "mn5en"
|
||||
#endif
|
||||
#elif CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8
|
||||
#define MULTINET_MODEL_EN esp_sr_multinet5_quantized8
|
||||
#define MULTINET_COEFF_EN "mn5q8en"
|
||||
#ifndef MULTINET_MODEL
|
||||
#define MULTINET_MODEL esp_sr_multinet5_quantized8
|
||||
#define MULTINET_COEFF "mn5q8en"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define MULTINET_MODEL "NULL"
|
||||
#define MULTINET_COEFF "NULL"
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
|
||||
esp_wn_model_t get_first_wake_word(void);
|
||||
esp_wn_model_t get_second_wake_word(void);
|
||||
void check_chip_config(void);
|
||||
char *get_id_name_cn(int i);
|
||||
char *get_id_name_en(int i);
|
||||
void reset_speech_commands(model_iface_data_t *model_data, char* command_str, char *err_phrase_id);
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,6 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_log.h"
|
||||
#include "mn_process_commands.h"
|
||||
|
||||
char *get_id_name_cn(int i)
|
||||
@ -890,6 +891,49 @@ esp_wn_model_t get_second_wake_word(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void check_chip_config(void)
|
||||
{
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32S3
|
||||
#ifndef CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240
|
||||
ESP_LOGE("SR_SYS", "CPU freq should be 240MHz");
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ESPTOOLPY_FLASHFREQ_80M
|
||||
ESP_LOGE("SR_SYS", "Flash freq should be 240MHz");
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SPIRAM_SPEED_80M
|
||||
ESP_LOGE("SR_SYS", "PSRAM freq should be 80MHz");
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ESP32S3_DATA_CACHE_64KB
|
||||
ESP_LOGE("SR_SYS", "Data cache should be 64KB");
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ESP32S3_DATA_CACHE_LINE_64B
|
||||
ESP_LOGE("SR_SYS", "Data cache line should be 64B");
|
||||
#endif
|
||||
#elif CONFIG_IDF_TARGET_ESP32
|
||||
#ifndef CONFIG_ESP32_DEFAULT_CPU_FREQ_240
|
||||
ESP_LOGE("SR_SYS", "CPU freq should be 240MHz");
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SPIRAM_SPEED_80M
|
||||
ESP_LOGE("SR_SYS", "PSRAM freq should be 80MHz");
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ESPTOOLPY_FLASHFREQ_80M
|
||||
ESP_LOGE("SR_SYS", "Flash freq should be 80MHz");
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ESPTOOLPY_FLASHMODE_QIO
|
||||
ESP_LOGE("SR_SYS", "Flash mode should be QIO");
|
||||
#endif
|
||||
#else
|
||||
ESP_LOGE("SR_SYS", "ESP-SR-AFE only support ESP32/ESP32S3");
|
||||
#endif
|
||||
}
|
||||
|
||||
void reset_speech_commands_v1(model_iface_data_t *model_data, char* command_str, char *err_phrase_id);
|
||||
void reset_speech_commands_v2(model_iface_data_t *model_data, char* command_str, char *err_phrase_id);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user