void local_voice_task(void *arg) { BOARD_InitDebugConsole(); PRINTF("1 1 1...\r\n"); int16_t pi16Sample[NUM_SAMPLES_AFE_OUTPUT]; uint32_t len = 0; uint32_t statusFlash = 0; asr_events_t asrEvent = ASR_SESSION_ENDED; struct asr_inference_engine *pInfWW; struct asr_inference_engine *pInfCMD; char **cmdString; // Read Shell Commands Parameters from flash memory. If not available, initialize and write into flash memory. statusFlash = SLN_FLASH_MGMT_Read(ASR_SHELL_COMMANDS_FILE_NAME, (uint8_t *)&appAsrShellCommands, &len); if (statusFlash != SLN_FLASH_MGMT_OK) { configPRINTF(("Failed reading local demo configuration from flash memory.\r\n")); } if (appAsrShellCommands.status != WRITE_SUCCESS) { appAsrShellCommands.demo = ASR_CMD_LED; appAsrShellCommands.followup = ASR_FOLLOWUP_OFF; appAsrShellCommands.multilingual = ASR_ENGLISH; appAsrShellCommands.mute = ASR_MUTE_OFF; appAsrShellCommands.ptt = ASR_PTT_OFF; appAsrShellCommands.timeout = TIMEOUT_TIME_IN_MS; appAsrShellCommands.volume = 55; appAsrShellCommands.status = WRITE_SUCCESS; appAsrShellCommands.asrCfg = ASR_CFG_DEMO_NO_CHANGE; statusFlash = SLN_FLASH_MGMT_Save(ASR_SHELL_COMMANDS_FILE_NAME, (uint8_t *)&appAsrShellCommands, sizeof(app_asr_shell_commands_t)); if ((statusFlash == SLN_FLASH_MGMT_EOVERFLOW) || (statusFlash == SLN_FLASH_MGMT_EOVERFLOW2)) { statusFlash = SLN_FLASH_MGMT_Erase(ASR_SHELL_COMMANDS_FILE_NAME); statusFlash = SLN_FLASH_MGMT_Save(ASR_SHELL_COMMANDS_FILE_NAME, (uint8_t *)&appAsrShellCommands, sizeof(app_asr_shell_commands_t)); if (statusFlash != SLN_FLASH_MGMT_OK) { configPRINTF(("Failed writing local demo configuration in flash memory.\r\n")); } } else if (statusFlash != SLN_FLASH_MGMT_OK) { configPRINTF(("Failed writing local demo configuration in flash memory.\r\n")); } } PRINTF("2 2 2...\r\n"); initialize_asr(); // We need to reset asrCfg state so we won't remember an unprocessed demo change that was saved in flash appAsrShellCommands.asrCfg = ASR_CFG_DEMO_NO_CHANGE; PRINTF("3 3 3 ... \r\n"); while (!g_xSampleQueue) { vTaskDelay(10); configPRINTF(("x\r\n")); PRINTF("x\r\n"); } int x = DbgConsole_Printf("4 4 4... \r\n"); configPRINTF(("4 4 4... x = %d\r\n", x)); for (int i = 0; i < 20; i++) { PRINTF("7777777777"); vTaskDelay(100); } // PRINTF("4 4 4... \r\n"); while (1) {