MWR_LOGE("[ERROR] wakeup engine %s threw exception : %s",
info.engine_name.c_str(), e.what());
}
+ } else {
+ MWR_LOGE("Wakeup Engine does not provide add_wakeup_word");
+ }
+ }
+ }
+}
+
+void CWakeupEngineManager::engine_remove_wakeup_word(string appid, string wakeup_word, string language)
+{
+ for (const auto& info : mEngineInfo) {
+ bool found = contains(info.assistant_list, appid);
+ if (found) {
+ if (info.interface.remove_wakeup_word) {
+ try {
+ info.interface.remove_wakeup_word(appid.c_str(), wakeup_word.c_str(), language.c_str());
+ } catch (const std::exception& e) {
+ MWR_LOGE("[ERROR] wakeup engine %s threw exception : %s",
+ info.engine_name.c_str(), e.what());
+ }
+ } else {
+ MWR_LOGE("Wakeup Engine does not provide remove_wakeup_word");
}
}
}
info.interface.add_wakeup_word =
(wakeup_engine_add_wakeup_word)dlsym(info.engine_handle,
MA_WAKEUP_ENGINE_FUNC_ADD_WAKEUP_WORD);
+ info.interface.remove_wakeup_word =
+ (wakeup_engine_remove_wakeup_word)dlsym(info.engine_handle,
+ MA_WAKEUP_ENGINE_FUNC_REMOVE_WAKEUP_WORD);
info.interface.add_language =
(wakeup_engine_add_language)dlsym(info.engine_handle,
MA_WAKEUP_ENGINE_FUNC_ADD_LANGUAGE);