From 89dd076530a9d551d958ead849767b8b0fac6037 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 7 Jan 2020 16:49:03 +0900 Subject: [PATCH 01/16] Add volume.set privilege for sound ducking feature Change-Id: I405a53b9cd0068411bf9eccd4e9de37250e80420 --- org.tizen.multi-assistant-service.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/org.tizen.multi-assistant-service.xml b/org.tizen.multi-assistant-service.xml index 6e77c21..7ee7351 100644 --- a/org.tizen.multi-assistant-service.xml +++ b/org.tizen.multi-assistant-service.xml @@ -30,6 +30,7 @@ http://tizen.org/privilege/recorder http://tizen.org/privilege/internet http://tizen.org/privilege/network.get + http://tizen.org/privilege/volume.set http://tizen.org/privilege/bluetooth http://tizen.org/privilege/bluetooth.admin -- 2.7.4 From 05bc6c7a344c17a90f89556f36074171c251e0e8 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Wed, 8 Jan 2020 15:35:27 +0900 Subject: [PATCH 02/16] Fix incorrect parameter of vconf_ignore_key_changed() Change-Id: I6552ee7abf9477b991809f68c6b10284b254b01b --- plugins/wakeup-manager/src/wakeup_settings.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/wakeup-manager/src/wakeup_settings.cpp b/plugins/wakeup-manager/src/wakeup_settings.cpp index 7324838..c7c1142 100644 --- a/plugins/wakeup-manager/src/wakeup_settings.cpp +++ b/plugins/wakeup-manager/src/wakeup_settings.cpp @@ -231,10 +231,13 @@ void CWakeupSettings::initialize() void CWakeupSettings::deinitialize() { - vconf_ignore_key_changed(WAKEUP_SETTINGS_KEY_VOICE_INPUT_LANGUAGE, NULL); - vconf_ignore_key_changed(WAKEUP_SETTINGS_KEY_DEFAULT_ASSISTANT_APPID, NULL); + vconf_ignore_key_changed(WAKEUP_SETTINGS_KEY_VOICE_INPUT_LANGUAGE, + wakeup_setting_input_language_changed_cb); + vconf_ignore_key_changed(WAKEUP_SETTINGS_KEY_DEFAULT_ASSISTANT_APPID, + wakeup_setting_default_assistant_appid_changed_cb); if (true == mMultipleMode) { - vconf_ignore_key_changed(WAKEUP_SETTINGS_KEY_ENABLED_ASSISTANTS, NULL); + vconf_ignore_key_changed(WAKEUP_SETTINGS_KEY_ENABLED_ASSISTANTS, + wakeup_setting_enabled_assistants_changed_cb); } } -- 2.7.4 From d62799e297732a8b2a92f98e3466b9a6ea3bedcd Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Wed, 8 Jan 2020 15:48:41 +0900 Subject: [PATCH 03/16] Make sure to delete timer when deinitializing Change-Id: Ifda8f8dea1513600d236e6b4c85660bd07dcbf29 --- plugins/wakeup-manager/src/wakeup_manager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/wakeup-manager/src/wakeup_manager.cpp b/plugins/wakeup-manager/src/wakeup_manager.cpp index b2c427d..6ccc94a 100644 --- a/plugins/wakeup-manager/src/wakeup_manager.cpp +++ b/plugins/wakeup-manager/src/wakeup_manager.cpp @@ -137,6 +137,11 @@ bool CWakeupManager::deinitialize() { MWR_LOGI("[ENTER]"); + if (mStreamingDurationTimer) { + ecore_timer_del(mStreamingDurationTimer); + mStreamingDurationTimer = nullptr; + } + dependency_resolver_deinitialize(); mAssistantConfigManager.deinitialize(); -- 2.7.4 From 0a9ba47e9872ce41830fd9bb2513359baa1601da Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Wed, 8 Jan 2020 15:36:25 +0900 Subject: [PATCH 04/16] Bump version to 0.2.23 Change-Id: I4271048f1d8ebd33f8b6b889291d84cf21bba1e0 --- org.tizen.multi-assistant-service.xml | 2 +- packaging/org.tizen.multi-assistant-service.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.tizen.multi-assistant-service.xml b/org.tizen.multi-assistant-service.xml index 7ee7351..dd53b5a 100644 --- a/org.tizen.multi-assistant-service.xml +++ b/org.tizen.multi-assistant-service.xml @@ -1,5 +1,5 @@ - + Won Nam Jang Sooyeon Kim diff --git a/packaging/org.tizen.multi-assistant-service.spec b/packaging/org.tizen.multi-assistant-service.spec index 835e25e..e461735 100644 --- a/packaging/org.tizen.multi-assistant-service.spec +++ b/packaging/org.tizen.multi-assistant-service.spec @@ -1,6 +1,6 @@ Name: org.tizen.multi-assistant-service Summary: Multi assistant service -Version: 0.2.22 +Version: 0.2.23 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Flora-1.1 -- 2.7.4 From 81ba7072bd8a0fe016a864448c203e3805021a61 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Fri, 10 Jan 2020 19:21:30 +0900 Subject: [PATCH 05/16] Use aul_launch_app_async for launching voice assistants Change-Id: I86a4986fba9d4e811d70f0f23c99f8e800000ed1 --- src/multi_assistant_service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/multi_assistant_service.c b/src/multi_assistant_service.c index 08f0435..7fb2f3e 100644 --- a/src/multi_assistant_service.c +++ b/src/multi_assistant_service.c @@ -1084,9 +1084,9 @@ int mas_launch_client_by_appid(const char *appid, CLIENT_LAUNCH_MODE launch_mode appid, b, result, get_error_message(result)); } - result = aul_launch_app(appid, b); + result = aul_launch_app_async(appid, b); if (result < AUL_R_OK) { - MAS_LOGE("ERROR : aul_launch_app failed. app_id [%s] bundle[%p] result[%d : %s]", + MAS_LOGE("ERROR : aul_launch_app_async failed. app_id [%s] bundle[%p] result[%d : %s]", appid, b, result, get_error_message(result)); } -- 2.7.4 From 44a92674edb7200b99a9cce2e3e51f9de16737d4 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Fri, 10 Jan 2020 19:21:52 +0900 Subject: [PATCH 06/16] Bump version to 0.2.24 Change-Id: I693804f54163f36e172cfb64a11486078ae6b5ac --- org.tizen.multi-assistant-service.xml | 2 +- packaging/org.tizen.multi-assistant-service.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.tizen.multi-assistant-service.xml b/org.tizen.multi-assistant-service.xml index dd53b5a..f0d6800 100644 --- a/org.tizen.multi-assistant-service.xml +++ b/org.tizen.multi-assistant-service.xml @@ -1,5 +1,5 @@ - + Won Nam Jang Sooyeon Kim diff --git a/packaging/org.tizen.multi-assistant-service.spec b/packaging/org.tizen.multi-assistant-service.spec index e461735..3e9c894 100644 --- a/packaging/org.tizen.multi-assistant-service.spec +++ b/packaging/org.tizen.multi-assistant-service.spec @@ -1,6 +1,6 @@ Name: org.tizen.multi-assistant-service Summary: Multi assistant service -Version: 0.2.23 +Version: 0.2.24 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Flora-1.1 -- 2.7.4 From 21f419bd7b942b87981b8655a002c1d2109bc4e4 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Mon, 13 Jan 2020 19:25:05 +0900 Subject: [PATCH 07/16] Use %cmake macro in spec file Change-Id: I04ab302b6b17b3737438abde1d47c3dab378a901 --- packaging/org.tizen.multi-assistant-service.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/org.tizen.multi-assistant-service.spec b/packaging/org.tizen.multi-assistant-service.spec index 3e9c894..433113b 100644 --- a/packaging/org.tizen.multi-assistant-service.spec +++ b/packaging/org.tizen.multi-assistant-service.spec @@ -53,7 +53,7 @@ LDFLAGS="$LDFLAGS -Wl,-z -Wl,nodelete" %endif export LDFLAGS -cmake \ +%cmake \ -DCMAKE_INSTALL_PREFIX=%{_appdir} \ -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE \ -- 2.7.4 From aae71f1222e3e4c09fc3ab19e32f465ff462591e Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 14 Jan 2020 11:32:24 +0900 Subject: [PATCH 08/16] Rename inappropriate bindir to appbindir in spec file Change-Id: I0991e235573903be28e39cc742fc3a60772f0656 --- packaging/org.tizen.multi-assistant-service.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/org.tizen.multi-assistant-service.spec b/packaging/org.tizen.multi-assistant-service.spec index 433113b..5028e58 100644 --- a/packaging/org.tizen.multi-assistant-service.spec +++ b/packaging/org.tizen.multi-assistant-service.spec @@ -38,7 +38,7 @@ org.tizen.multi-assistant-service (application) %define _usrdir /usr #%define _appdir %{_usrdir}/apps/org.tizen.multi-assistant-service/ %define _appdir %{TZ_SYS_RO_APP}/%{name} -%define _bindir %{_appdir}/bin/ +%define _appbindir %{_appdir}/bin/ %prep %setup -q @@ -67,7 +67,7 @@ cp LICENSE.Flora %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name} %make_install %post -mkdir -p %{_bindir} +mkdir -p %{_appbindir} mkdir -p %{_libdir}/multiassistant/ma/1.0/engine /sbin/ldconfig @@ -89,4 +89,4 @@ exit 0 #%{_appdir}/lib/* %{_appdir}/bin/* #%defattr(-,app,app,-) -#%{_bindir}/org.tizen.multi-assistant-service +#%{_appbindir}/org.tizen.multi-assistant-service -- 2.7.4 From 9eb5d0268f7e03afc41c5ba6f3149afdc6f81dab Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 14 Jan 2020 13:35:55 +0900 Subject: [PATCH 09/16] Remove unnecessary log Change-Id: Idef3dc8a6fcc845e39939f04ff9baebc14849bc6 --- .../wakeup-manager/dependency-default/src/dependency_default_button.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/wakeup-manager/dependency-default/src/dependency_default_button.cpp b/plugins/wakeup-manager/dependency-default/src/dependency_default_button.cpp index f52886b..3b85756 100644 --- a/plugins/wakeup-manager/dependency-default/src/dependency_default_button.cpp +++ b/plugins/wakeup-manager/dependency-default/src/dependency_default_button.cpp @@ -33,7 +33,6 @@ static Eina_Bool _key_down_cb(void* data, int type, void* event) auto diff = current_time_point - g_last_time_point; auto milliseconds = chrono::duration_cast(diff).count(); /* If double click detected within 500 msec */ - LOGD("milliseconds : %lld", milliseconds); if (milliseconds < 500) { if (g_proxy_interface.process_event) { g_proxy_interface.process_event(MAS_PLUGIN_EVENT_VOICE_KEY_PRESSED, NULL, 0); -- 2.7.4 From c0117cf447383946824684c6bddaa55c53d4d3ce Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Wed, 15 Jan 2020 11:13:52 +0900 Subject: [PATCH 10/16] Revert "Make dbus message sending to be executed in main thread" This reverts commit 5afd1db88433ef88f4e167f4adbd2c9d3375665b. Change-Id: I8d99360d1e3274b95ddb7f9ecc326a8b7fd7053f --- src/multi_assistant_service_plugin.c | 46 +++++++++--------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/src/multi_assistant_service_plugin.c b/src/multi_assistant_service_plugin.c index bd9de18..6eed1f5 100644 --- a/src/multi_assistant_service_plugin.c +++ b/src/multi_assistant_service_plugin.c @@ -272,20 +272,15 @@ static void handle_speech_streaming_event_failure(void *data) mas_client_send_recognition_result(0, MA_RECOGNITION_RESULT_EVENT_ERROR); } -static void handle_speech_streaming_event_success(void *data) +static void __audio_streaming_cb(mas_speech_streaming_event_e event, unsigned char* buffer, int len, void *user_data) { - if (NULL == data) return; - - mas_speech_data* speech_data = data; - if (NULL == speech_data->buffer) { - free(speech_data); + if (event == MAS_SPEECH_STREAMING_EVENT_FAIL) { + ecore_main_loop_thread_safe_call_async(handle_speech_streaming_event_failure, NULL); return; } - static int count = 0; - if (speech_data->event != MAS_SPEECH_STREAMING_EVENT_CONTINUE || count % 100 == 0) { - MAS_LOGD( "[SUCCESS] __audio_streaming_cb is called, event(%d), buffer(%p), len(%d)", - speech_data->event, speech_data->buffer, speech_data->len); + if (event != MAS_SPEECH_STREAMING_EVENT_CONTINUE || count % 100 == 0) { + MAS_LOGD( "[SUCCESS] __audio_streaming_cb is called, event(%d), buffer(%p), len(%d)", event, buffer, len); } ++count; @@ -294,15 +289,13 @@ static void handle_speech_streaming_event_success(void *data) if (pid == -1) { MAS_LOGE("[ERROR] Fail to retrieve pid of current MA client"); } else { - if (__validate_streaming_event_order(pid, &(speech_data->event))) { - int ret = masc_dbus_send_streaming_audio_data(pid, - speech_data->event, speech_data->buffer, speech_data->len); + if (__validate_streaming_event_order(pid, &event)) { + int ret = masc_dbus_send_streaming_audio_data(pid, event, buffer, len); if (0 != ret) { MAS_LOGE("[ERROR] Fail to send speech data, ret(%d)", ret); } if (pid != preprocessing_pid && -1 != preprocessing_pid) { - int ret = masc_dbus_send_streaming_audio_data(preprocessing_pid, - speech_data->event, speech_data->buffer, speech_data->len); + int ret = masc_dbus_send_streaming_audio_data(preprocessing_pid, event, buffer, len); if (0 != ret) { MAS_LOGE("[ERROR] Fail to send speech data to preprocessing client, ret(%d)", ret); } @@ -311,10 +304,11 @@ static void handle_speech_streaming_event_success(void *data) } #ifdef BUF_SAVE_MODE + /* write pcm buffer */ if (g_pFile) - fwrite(speech_data->buffer, 1, speech_data->len, g_pFile); + fwrite(buffer, 1, len, g_pFile); - if (MAS_SPEECH_STREAMING_EVENT_FINISH == speech_data->event) { + if (MAS_SPEECH_STREAMING_EVENT_FINISH == event) { if (g_pFile) { MAS_LOGE("[Recorder SUCCESS] File Close"); fclose(g_pFile); @@ -324,24 +318,6 @@ static void handle_speech_streaming_event_success(void *data) } } #endif - free(speech_data->buffer); - free(speech_data); -} - -static void __audio_streaming_cb(mas_speech_streaming_event_e event, unsigned char* buffer, int len, void *user_data) -{ - if (event == MAS_SPEECH_STREAMING_EVENT_FAIL) { - ecore_main_loop_thread_safe_call_async(handle_speech_streaming_event_failure, NULL); - } else { - mas_speech_data* data = malloc(sizeof(mas_speech_data)); - if (data) { - data->event = event; - data->buffer = malloc(len); - if (data->buffer) memcpy(data->buffer, buffer, len); - data->len = len; - ecore_main_loop_thread_safe_call_async(handle_speech_streaming_event_success, data); - } - } } static void __speech_status_cb(mas_speech_status_e status, void *user_data) -- 2.7.4 From f7320f76c78894ee9f3c30fa60b38b0c505158a9 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Wed, 15 Jan 2020 14:51:54 +0900 Subject: [PATCH 11/16] Prevent burst transmission of streaming audio data Change-Id: I02c0086a708cdea0adcbf259a4aa23065c5ebb3b --- plugins/wakeup-manager/src/wakeup_engine_manager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/wakeup-manager/src/wakeup_engine_manager.cpp b/plugins/wakeup-manager/src/wakeup_engine_manager.cpp index 41af682..642b0f8 100644 --- a/plugins/wakeup-manager/src/wakeup_engine_manager.cpp +++ b/plugins/wakeup-manager/src/wakeup_engine_manager.cpp @@ -363,6 +363,7 @@ void CWakeupEngineManager::streaming_speech_data_thread_func() } } + int burst_count = 0; while (!(mStopStreamingThread.load())) { int ret = -1; int cnt = 0; @@ -376,6 +377,7 @@ void CWakeupEngineManager::streaming_speech_data_thread_func() /* waiting */ while (!(mStopStreamingThread.load())) { + burst_count = 0; this_thread::sleep_for(chrono::milliseconds(10)); if (index < interface->get_utterance_data_count()) { MWR_LOGD("[INFO] Resume thread"); @@ -428,6 +430,13 @@ void CWakeupEngineManager::streaming_speech_data_thread_func() } } #endif + const int sleep_duration_in_millis = 10; + const int max_burst_count = 3; + if (++burst_count >= max_burst_count) { + burst_count = 0; + this_thread::sleep_for(chrono::milliseconds(sleep_duration_in_millis)); + MWR_LOGI("[INFO] Streaming data burst transmission detected, forcing sleep"); + } for (const auto& observer : mObservers) { if (observer) { if (!observer->on_streaming_audio_data( -- 2.7.4 From 6a7fed91ee2d1e019ae0b77d4178eb3cc17ae860 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Wed, 15 Jan 2020 21:33:16 +0900 Subject: [PATCH 12/16] Bump version to 0.2.25 Change-Id: I143a6cc3b11c6181ffe6e7d695591d38a42b5364 --- org.tizen.multi-assistant-service.xml | 2 +- packaging/org.tizen.multi-assistant-service.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.tizen.multi-assistant-service.xml b/org.tizen.multi-assistant-service.xml index f0d6800..7b7ab2a 100644 --- a/org.tizen.multi-assistant-service.xml +++ b/org.tizen.multi-assistant-service.xml @@ -1,5 +1,5 @@ - + Won Nam Jang Sooyeon Kim diff --git a/packaging/org.tizen.multi-assistant-service.spec b/packaging/org.tizen.multi-assistant-service.spec index 5028e58..00d3052 100644 --- a/packaging/org.tizen.multi-assistant-service.spec +++ b/packaging/org.tizen.multi-assistant-service.spec @@ -1,6 +1,6 @@ Name: org.tizen.multi-assistant-service Summary: Multi assistant service -Version: 0.2.24 +Version: 0.2.25 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Flora-1.1 -- 2.7.4 From 8a1c1439ead994d3f4746bf19001754c8d61397d Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Thu, 23 Jan 2020 16:24:12 +0900 Subject: [PATCH 13/16] Make sure to stop streaming before interacting with wakeup engines Basically streaming is processed in a separate thread, and for that reason any iteraction with wakeup engines can cause undesired changes in internal audio data that should be acquired by the streaming thread. So for the sake of safety, make sure to stop streaming first so that following changes in internal audio data within the wakeup engine would not cause any side-effect in the streaming thread side. Change-Id: Ib544e39cff8df5238c9d1f57e1f7644988c27ac1 --- plugins/wakeup-manager/src/wakeup_manager.cpp | 29 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/plugins/wakeup-manager/src/wakeup_manager.cpp b/plugins/wakeup-manager/src/wakeup_manager.cpp index 6ccc94a..25e4e60 100644 --- a/plugins/wakeup-manager/src/wakeup_manager.cpp +++ b/plugins/wakeup-manager/src/wakeup_manager.cpp @@ -463,16 +463,16 @@ bool CWakeupManager::set_background_volume(string appid, double ratio) bool CWakeupManager::update_recognition_result(string appid, int result) { MWR_LOGD("[ENTER]"); - if (WAKEUP_MANAGER_STATE_UTTERANCE == mWakeupManagerState) { - mAudioManager.set_recording_session(RECORDING_SESSION_WAKE_WORD); - } + + stop_streaming_utterance_data(); + stop_streaming_previous_utterance_data(); + stop_streaming_follow_up_data(); + + mAudioManager.set_recording_session(RECORDING_SESSION_WAKE_WORD); mWakeupEngineManager.update_recognition_result(appid, result); if (WAKEUP_MANAGER_STATE_PROCESSING == mWakeupManagerState || WAKEUP_MANAGER_STATE_UTTERANCE == mWakeupManagerState) { change_manager_state(WAKEUP_MANAGER_STATE_LISTENING); - stop_streaming_utterance_data(); - stop_streaming_previous_utterance_data(); - stop_streaming_follow_up_data(); } MWR_LOGD("[END]"); return true; @@ -659,6 +659,9 @@ bool CWakeupManager::stop_streaming_utterance_data() MWR_LOGD("[ENTER]"); if (STREAMING_MODE::UTTERANCE != mStreamingMode) return false; + mAudioManager.stop_streaming_current_utterance_data(); + mWakeupEngineManager.stop_streaming_current_utterance_data(); + if (mStreamingDurationTimer) { ecore_thread_main_loop_begin(); ecore_timer_del(mStreamingDurationTimer); @@ -669,8 +672,6 @@ bool CWakeupManager::stop_streaming_utterance_data() change_manager_state(WAKEUP_MANAGER_STATE_PROCESSING); mAudioManager.set_recording_session(RECORDING_SESSION_WAKE_WORD); } - mAudioManager.stop_streaming_current_utterance_data(); - mWakeupEngineManager.stop_streaming_current_utterance_data(); mStreamingMode = STREAMING_MODE::NONE; @@ -715,17 +716,19 @@ bool CWakeupManager::stop_streaming_follow_up_data() MWR_LOGD("[ENTER]"); if (STREAMING_MODE::FOLLOW_UP != mStreamingMode) return false; + mAudioManager.stop_streaming_follow_up_data(); + mWakeupEngineManager.stop_streaming_current_utterance_data(); + if (mStreamingDurationTimer) { ecore_thread_main_loop_begin(); ecore_timer_del(mStreamingDurationTimer); mStreamingDurationTimer = nullptr; ecore_thread_main_loop_end(); } + if (WAKEUP_MANAGER_STATE_UTTERANCE == mWakeupManagerState) { change_manager_state(WAKEUP_MANAGER_STATE_PROCESSING); } - mAudioManager.stop_streaming_follow_up_data(); - mWakeupEngineManager.stop_streaming_current_utterance_data(); mStreamingMode = STREAMING_MODE::NONE; @@ -767,17 +770,19 @@ bool CWakeupManager::stop_streaming_previous_utterance_data() MWR_LOGD("[ENTER]"); if (STREAMING_MODE::PREVIOUS_UTTERANCE != mStreamingMode) return false; + mAudioManager.stop_streaming_previous_utterance_data(); + mWakeupEngineManager.stop_streaming_current_utterance_data(); + if (mStreamingDurationTimer) { ecore_thread_main_loop_begin(); ecore_timer_del(mStreamingDurationTimer); mStreamingDurationTimer = nullptr; ecore_thread_main_loop_end(); } + if (WAKEUP_MANAGER_STATE_UTTERANCE == mWakeupManagerState) { change_manager_state(WAKEUP_MANAGER_STATE_PROCESSING); } - mAudioManager.stop_streaming_previous_utterance_data(); - mWakeupEngineManager.stop_streaming_current_utterance_data(); mStreamingMode = STREAMING_MODE::NONE; -- 2.7.4 From 7cf102be67abf1f0d06be64f7fe86ef1ffb311f7 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Thu, 23 Jan 2020 16:34:01 +0900 Subject: [PATCH 14/16] Bump version to 0.2.26 Change-Id: Ifb29ba5083267ed57c422f71849a3972b22aece3 --- org.tizen.multi-assistant-service.xml | 2 +- packaging/org.tizen.multi-assistant-service.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.tizen.multi-assistant-service.xml b/org.tizen.multi-assistant-service.xml index 7b7ab2a..5151c0a 100644 --- a/org.tizen.multi-assistant-service.xml +++ b/org.tizen.multi-assistant-service.xml @@ -1,5 +1,5 @@ - + Won Nam Jang Sooyeon Kim diff --git a/packaging/org.tizen.multi-assistant-service.spec b/packaging/org.tizen.multi-assistant-service.spec index 00d3052..946c824 100644 --- a/packaging/org.tizen.multi-assistant-service.spec +++ b/packaging/org.tizen.multi-assistant-service.spec @@ -1,6 +1,6 @@ Name: org.tizen.multi-assistant-service Summary: Multi assistant service -Version: 0.2.25 +Version: 0.2.26 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Flora-1.1 -- 2.7.4 From 17f0dc23fa351ab86b3c0b7fbe0d7c2b39728dc4 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Thu, 23 Jan 2020 17:57:33 +0900 Subject: [PATCH 15/16] Use cached audio type value when plugin is not available Change-Id: Ia50b1700b34fedce11b88c27bc675f70eb294e8e --- src/multi_assistant_service.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/multi_assistant_service.c b/src/multi_assistant_service.c index 7fb2f3e..72ef66f 100644 --- a/src/multi_assistant_service.c +++ b/src/multi_assistant_service.c @@ -291,13 +291,21 @@ int mas_client_get_audio_format(int pid, int* rate, int* channel, int* audio_typ return ret; } +#define MAX_LOCAL_VARIABLE_STRING_LEN 256 int mas_client_get_audio_source_type(int pid, char** type) { MAS_LOGD("[Enter] pid(%d)", pid); + if (NULL == type) return -1; + + static char cached[MAX_LOCAL_VARIABLE_STRING_LEN] = {'\0'}; int ret = multi_assistant_service_plugin_get_recording_audio_source_type(type); if (0 != ret){ MAS_LOGE("[ERROR] Fail to get recording audio source type, ret(%d)", ret); + *type = cached; + } else if (*type) { + strncpy(cached, *type, MAX_LOCAL_VARIABLE_STRING_LEN - 1); + cached[MAX_LOCAL_VARIABLE_STRING_LEN - 1] = '\0'; } return ret; -- 2.7.4 From 4bac121562ef9d18d893fb30ed5d69cecd9067c2 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Thu, 23 Jan 2020 17:43:52 +0900 Subject: [PATCH 16/16] Bump version to 0.2.27 Change-Id: Ia1a65d8403c632ab0496f85e9751ee7e50cf2fe8 --- org.tizen.multi-assistant-service.xml | 2 +- packaging/org.tizen.multi-assistant-service.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.tizen.multi-assistant-service.xml b/org.tizen.multi-assistant-service.xml index 5151c0a..1af46bc 100644 --- a/org.tizen.multi-assistant-service.xml +++ b/org.tizen.multi-assistant-service.xml @@ -1,5 +1,5 @@ - + Won Nam Jang Sooyeon Kim diff --git a/packaging/org.tizen.multi-assistant-service.spec b/packaging/org.tizen.multi-assistant-service.spec index 946c824..31188d2 100644 --- a/packaging/org.tizen.multi-assistant-service.spec +++ b/packaging/org.tizen.multi-assistant-service.spec @@ -1,6 +1,6 @@ Name: org.tizen.multi-assistant-service Summary: Multi assistant service -Version: 0.2.26 +Version: 0.2.27 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Flora-1.1 -- 2.7.4