diff --git a/CMakeLists.txt b/CMakeLists.txt index 631ab4b3..5b800b0d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(PROJECT_VER "0.9.3") +set(PROJECT_VER "0.9.4") include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(xiaozhi) diff --git a/main/application.cc b/main/application.cc index e1a57777..ef339242 100644 --- a/main/application.cc +++ b/main/application.cc @@ -411,9 +411,11 @@ void Application::OutputAudio() { std::unique_lock lock(mutex_); if (audio_decode_queue_.empty()) { // Disable the output if there is no audio data for a long time - auto duration = std::chrono::duration_cast(now - last_output_time_).count(); - if (duration > max_silence_seconds) { - codec->EnableOutput(false); + if (chat_state_ == kChatStateIdle) { + auto duration = std::chrono::duration_cast(now - last_output_time_).count(); + if (duration > max_silence_seconds) { + codec->EnableOutput(false); + } } return; }