iter = lead;
advance(lead, 1);
}
- MWR_LOGI("data_count : %zu", mAudioData.size());
+ MWR_LOGE("data_count : %zu", mAudioData.size());
lock.unlock();
while (!(mStopStreamingThread.load())) {
}
if (MAS_SPEECH_STREAMING_EVENT_FINISH == speech_data.event) {
- MWR_LOGI("[INFO] Finish to get and send speech data");
+ MWR_LOGE("[INFO] Finish to get and send speech data");
finish_event_sent = true;
break;
}
lock.unlock();
for (const auto& observer : observers) {
if (observer) {
- MWR_LOGI("No FINISH event sent yet, adding to finalize streaming session");
+ MWR_LOGE("No FINISH event sent yet, adding to finalize streaming session");
if (!observer->on_streaming_audio_data(
MAS_SPEECH_STREAMING_EVENT_FINISH, final_buffer, sizeof(final_buffer))) {
LOGE("[Recorder WARNING] One of the observer returned false");
}
}
mStreamingThreadActive.store(false);
- MWR_LOGI("[EXIT]");
+ MWR_LOGE("[EXIT]");
}
void CAudioManager::add_audio_data(mas_speech_data& data, long long time)
static auto last = std::chrono::steady_clock::now();
auto now = std::chrono::steady_clock::now();
if (now - last > interval) {
- MWR_LOGI("Feeding audio data : num(%d), now(%" PRId64 "), %d %zu",
+ MWR_LOGE("Feeding audio data : num(%d), now(%" PRId64 "), %d %zu",
num, now.time_since_epoch().count(),
mStreamingThreadActive.load(), mAudioData.size());
last = now;
void CWakeupEngineManager::set_assistant_activated(string appid, bool activated)
{
- MWR_LOGI("[ENTER] : %s %d", appid.c_str(), activated);
+ MWR_LOGE("[ENTER] : %s %d", appid.c_str(), activated);
for (auto& info : mEngineInfo) {
const auto& iter = find_if(info.assistant_list.begin(), info.assistant_list.end(),
[appid](const string& assistant) {
void CWakeupEngineManager::streaming_speech_data_thread_func()
{
- MWR_LOGI("[ENTER]");
+ MWR_LOGE("[ENTER]");
if (nullptr == mSelectedEngine) {
MWR_LOGE("No Engine Selected");
}
if (MAS_SPEECH_STREAMING_EVENT_FINISH == speech_data.event) {
- MWR_LOGI("[INFO] Finish to get and send speech data");
+ MWR_LOGE("[INFO] Finish to get and send speech data");
finish_event_sent = true;
break;
}
unsigned char final_buffer[2] = {'\0', };
for (const auto& observer : mObservers) {
if (observer) {
- MWR_LOGI("No FINISH event sent yet, adding to finalize streaming session");
+ MWR_LOGE("No FINISH event sent yet, adding to finalize streaming session");
if (!observer->on_streaming_audio_data(
MAS_SPEECH_STREAMING_EVENT_FINISH, final_buffer, sizeof(final_buffer))) {
LOGE("[Recorder WARNING] One of the observer returned false");
#endif
}
- MWR_LOGI("[EXIT]");
+ MWR_LOGE("[EXIT]");
}
void CWakeupEngineManager::start_streaming_current_utterance_data()
bool CWakeupManager::initialize()
{
- MWR_LOGI("[ENTER]");
+ MWR_LOGE("[ENTER]");
mPolicyEventObserver.set_wakeup_manager(this);
mEngineEventObserver.set_wakeup_manager(this);
bool CWakeupManager::deinitialize()
{
- MWR_LOGI("[ENTER]");
+ MWR_LOGE("[ENTER]");
stop_streaming_duration_timer();
mWakeupSettings.deinitialize();
mAssistantLanguageInfo.clear();
- MWR_LOGI("[END]");
+ MWR_LOGE("[END]");
return true;
}
bool CWakeupManager::set_default_assistant(string appid)
{
- MWR_LOGI("[ENTER]");
+ MWR_LOGE("[ENTER] %s", appid.c_str());
/* Check if previous default assistant has to be deactivated */
bool activated = true;
bool CWakeupManager::process_plugin_event(mas_plugin_event_e event, void* data, int len)
{
- MWR_LOGI("[ENTER] : %d", event);
+ MWR_LOGE("[ENTER] : %d", event);
if (WAKEUP_MANAGER_STATE_INACTIVE == mWakeupManagerState)
return false;
long long current_time = get_current_milliseconds_after_epoch();
static int last_serial_waiting_for_flush = -1;
- if (0 == header.streaming_data_serial % 50) {
+ if (0 == header.streaming_data_serial % 50 || MAS_SPEECH_STREAMING_EVENT_CONTINUE != event) {
last_serial_waiting_for_flush = header.streaming_data_serial;
- MAS_LOGI("queueing streaming data, serial : %d", last_serial_waiting_for_flush);
+ MAS_LOGE("queueing streaming data, serial : %d", last_serial_waiting_for_flush);
}
if (pending_buffer_size + total_size > STREAMING_BUFFER_SIZE ||
MAS_SPEECH_STREAMING_EVENT_FINISH == event ||
}
if (-1 != last_serial_waiting_for_flush) {
- MAS_LOGI("flushing streaming data, serial : %d", last_serial_waiting_for_flush);
+ MAS_LOGE("flushing streaming data, serial : %d", last_serial_waiting_for_flush);
last_serial_waiting_for_flush = -1;
}
}
int CServiceMain::client_send_recognition_result(pid_t pid, int result)
{
- MAS_LOGI("[Enter] pid(%d), result(%d)", pid, result);
+ MAS_LOGE("[Enter] pid(%d), result(%d)", pid, result);
if (!is_current_assistant(pid)) return -1;
bool ui_panel_enabled = mServicePlugin.is_ui_panel_enabled();
int CServiceMain::client_start_streaming_audio_data(pid_t pid, int type)
{
- MAS_LOGI("[ENTER] %d", type);
+ MAS_LOGE("[ENTER] %d", type);
int ret = -1;
if (!is_current_assistant(pid)) {
int CServiceMain::client_stop_streaming_audio_data(pid_t pid, int type)
{
- MAS_LOGI("[ENTER] %d", type);
+ MAS_LOGE("[ENTER] %d", type);
int ret = -1;
if (!is_current_assistant(pid)) {
boost::optional<bool> activated =
manager->get_bool(MULTI_ASSISTANT_SETTINGS_ACTIVATED);
if (activated) {
- MAS_LOGI("multi-assistant active state : %d\n", *activated);
+ MAS_LOGE("multi-assistant active state : %d\n", *activated);
CServicePlugin *plugin = nullptr;
if (g_service_main) {
if (0 < strlen(items[loop].wakeup_word[inner_loop])) {
if (0 == strncmp(wakeup_word, items[loop].wakeup_word[inner_loop], MAX_WAKEUP_WORD_LEN)) {
mCurrentClientInfo = loop;
- MAS_LOGI("mCurrentClientInfo : %d %s", mCurrentClientInfo, wakeup_word);
+ MAS_LOGE("mCurrentClientInfo : %d %s", mCurrentClientInfo, wakeup_word);
ret = 0;
}
}
}
if (0 == strncmp(wakeup_word, comparand, MAX_WAKEUP_WORD_LEN)) {
mCurrentClientInfo = loop;
- MAS_LOGI("mCurrentClientInfo : %d %s", mCurrentClientInfo, wakeup_word);
+ MAS_LOGE("mCurrentClientInfo : %d %s", mCurrentClientInfo, wakeup_word);
ret = 0;
}
}
0 < strlen(items[loop].appid) &&
0 < strlen(items[loop].wakeup_word[0])) {
if (strncmp(appid, items[loop].appid, MAX_APPID_LEN) == 0) {
- MAS_LOGI("mCurrentClientInfo : %d %s", mCurrentClientInfo, appid);
+ MAS_LOGE("mCurrentClientInfo : %d %s", mCurrentClientInfo, appid);
mCurrentClientInfo = loop;
ret = 0;
}
bool CServiceMain::app_create(void *data)
{
// Todo: add your code here.
- MAS_LOGI("[ENTER] Service app create");
+ MAS_LOGE("[ENTER] Service app create");
g_service_main = this;
mPackageUpdateMonitor.initialize();
- MAS_LOGI("[END] Service app create");
+ MAS_LOGE("[END] Service app create");
return true;
}
void CServiceMain::app_terminate(void *data)
{
- MAS_LOGI("[ENTER]");
+ MAS_LOGE("[ENTER]");
mPackageUpdateMonitor.deinitialize();
g_service_main = nullptr;
- MAS_LOGI("[END]");
+ MAS_LOGE("[END]");
return;
}