You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
913 B

#include "voiceprocess_service.hpp"
#include "iflytopcpp/core/spdlogfactory/logger.hpp"
#include "zservice_container/zservice_container.hpp"
using namespace iflytop;
using namespace std;
using namespace core;
void VoiceProcessService::initialize() {
//
GET_TO_SERVICE(m_beforeWakeupVoiceProcesser);
GET_TO_SERVICE(m_beforeasrVoiceProcesser);
GET_TO_SERVICE(m_wakeupProcesser);
GET_TO_SERVICE(m_audioRecoderService);
m_audioRecoderService->m_audioRecoder->onRecordData.connect(
[this](shared_ptr<AudioClip> audioClip) { m_beforeWakeupVoiceProcesser->writeVoice(audioClip); });
m_beforeWakeupVoiceProcesser->onAfterProcessVoice.connect(
[this](shared_ptr<AudioClip> audioClip) { m_beforeasrVoiceProcesser->writeVoice(audioClip); });
// m_wakeupProcesser->onWakeupSignal.connect(
// [this](float wakeup_score) { logger->info("wakeup_score:{}", wakeup_score); });
}