|
|
@ -104,8 +104,9 @@ void MainControlService::initializeVoiceProcess() { |
|
|
|
void MainControlService::triggerProcessConversationSession() { |
|
|
|
m_smartSoundboxPlayer->playConversationTTS(m_conversationSession->getAsrTTSLocalURL(), nullptr); |
|
|
|
json nlpResult = m_conversationSession->getNlpResult(); |
|
|
|
if (nlpResult["data"]["intent"]["shouldEndSession"]) { |
|
|
|
if (nlpResult["data"]["intent"]["shouldEndSession"] == "true") { |
|
|
|
logger->info("endSession"); |
|
|
|
if (m_endsessionTimer->isRunning()) m_endsessionTimer->stop(); |
|
|
|
endSession(); |
|
|
|
return; |
|
|
|
} |
|
|
@ -179,6 +180,7 @@ void MainControlService::constructSession() { |
|
|
|
|
|
|
|
m_smartSoundboxPlayer->triggerWakeup(); |
|
|
|
if (m_conversationSession) { |
|
|
|
if (m_endsessionTimer->isRunning()) m_endsessionTimer->stop(); |
|
|
|
endSession(); |
|
|
|
} |
|
|
|
|
|
|
|