From c97831faf4af101793f5ff9a04ea66d93cab5e43 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Thu, 26 Mar 2020 18:23:38 +0900 Subject: [PATCH 01/16] Remove to check if current engine is same as vconf This is temporary solution. Currently, VD didn't change vconf value for default engine. So, voice conrtrol framework thinks that current engine is one of TC. It'll be enabled when VD changes vconf correctly. Change-Id: I393ce91f1293a53215089397d4569153d275896d --- server/vcd_server.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/vcd_server.c b/server/vcd_server.c index 56df9a5..b253aa4 100755 --- a/server/vcd_server.c +++ b/server/vcd_server.c @@ -1240,6 +1240,7 @@ static int __vcd_db_clean_up() return ret; } +#if 0 static bool __is_default_engine() { char* engine = NULL; @@ -1262,6 +1263,7 @@ static bool __is_default_engine() free(engine); return FALSE; } +#endif int vcd_initialize(vce_request_callback_s *callback) { @@ -1310,13 +1312,13 @@ int vcd_initialize(vce_request_callback_s *callback) /* Initialize manager info */ vcd_client_manager_unset(); - if (TRUE == __is_default_engine()) { +// if (TRUE == __is_default_engine()) { /* Open dbus connection */ if (0 != vcd_dbus_open_connection()) { SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to open connection"); return VCD_ERROR_OPERATION_FAILED; } - } +// } vcd_config_set_service_state(VCD_STATE_READY); // vcdc_send_service_state(VCD_STATE_READY); -- 2.7.4 From 02de120e399fa806828c7d9ab15ef0ff6e6630f4 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Thu, 26 Mar 2020 18:42:12 +0900 Subject: [PATCH 02/16] Update version to 1.60.5 Change-Id: I62990b9606090c15f5ea5842b20f549942600dad --- CMakeLists.txt | 2 +- packaging/voice-control.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c857df4..b0132f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ PROJECT(vc) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "${PREFIX}") -SET(VERSION 1.60.4) +SET(VERSION 1.60.5) FIND_PROGRAM(UNAME NAMES uname) EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") diff --git a/packaging/voice-control.spec b/packaging/voice-control.spec index fb2155e..1c35223 100644 --- a/packaging/voice-control.spec +++ b/packaging/voice-control.spec @@ -1,6 +1,6 @@ Name: voice-control Summary: Voice control client library and daemon -Version: 1.60.4 +Version: 1.60.5 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Apache-2.0 -- 2.7.4 From 5c62a62db0da5d782c0b68fdf792979e78520a6d Mon Sep 17 00:00:00 2001 From: sungrae jo Date: Thu, 26 Mar 2020 17:22:54 +0900 Subject: [PATCH 03/16] Cleanup VC-manager internal functions Change-Id: Id682421019abfd55c8baf20756929646fea59fb8 Signed-off-by: sungrae jo --- client/vc_mgr.c | 113 +++++++++++++++++++------------ client/vc_mgr_dbus.c | 2 +- client/vc_mgr_dbus.h | 2 +- include/voice_control_manager_internal.h | 5 +- server/vcd_dbus_server.c | 2 +- server/vcd_server.c | 2 +- server/vcd_server.h | 2 +- 7 files changed, 76 insertions(+), 52 deletions(-) diff --git a/client/vc_mgr.c b/client/vc_mgr.c index d7879ae..e4bcd4f 100755 --- a/client/vc_mgr.c +++ b/client/vc_mgr.c @@ -4417,15 +4417,10 @@ static float __get_volume_decibel(char* data, int size) return db; } -int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, unsigned char* buffer, unsigned int len) +int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, char* buffer, unsigned int len) { SLOG(LOG_INFO, TAG_VCM, "[Manager] Send audio streaming to the engine service"); - if (NULL == buffer) { - SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid parameter"); - return VC_ERROR_INVALID_PARAMETER; - } - if (0 != __vc_mgr_get_feature_enabled()) { SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] not supported"); return VC_ERROR_NOT_SUPPORTED; @@ -4435,47 +4430,56 @@ int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, unsigned char* return VC_ERROR_PERMISSION_DENIED; } - vc_state_e state; - if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) { + if (VC_AUDIO_STREAMING_EVENT_FAIL > event || VC_AUDIO_STREAMING_EVENT_FINISH < event || 0 == event) { + SLOG(LOG_ERROR, TAG_VCM, "[ERROR] event is invalid parameter (%d)", event); + return VC_ERROR_INVALID_PARAMETER; + } + + if (NULL == buffer) { + SLOG(LOG_ERROR, TAG_VCM, "[ERROR] buffer is invalid parameter"); + return VC_ERROR_INVALID_PARAMETER; + } + + vc_state_e state = VC_STATE_NONE; + int ret = vc_mgr_client_get_client_state(g_vc_m, &state); + if (0 != ret) { SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available"); SLOG(LOG_DEBUG, TAG_VCM, "@@@"); return VC_ERROR_INVALID_STATE; } - /* check state */ if (state != VC_STATE_READY) { - SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid State: Current state is not 'READY'"); SLOG(LOG_DEBUG, TAG_VCM, "@@@"); return VC_ERROR_INVALID_STATE; } - /* Check service state */ - vc_service_state_e service_state = -1; - vc_mgr_client_get_service_state(g_vc_m, &service_state); - if (VC_SERVICE_STATE_READY != service_state && VC_SERVICE_STATE_RECORDING != service_state) { + vc_service_state_e service_state = VC_SERVICE_STATE_NONE; + ret = vc_mgr_client_get_service_state(g_vc_m, &service_state); + if (0 != ret) { + SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available"); + SLOG(LOG_DEBUG, TAG_VCM, "@@@"); + return VC_ERROR_INVALID_STATE; + } + if (VC_SERVICE_STATE_READY != service_state && VC_SERVICE_STATE_RECORDING != service_state) { SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid State: service state is not 'READY' and 'RECORDING', state(%d)", service_state); SLOG(LOG_DEBUG, TAG_VCM, "@@@"); return VC_ERROR_INVALID_STATE; } - /* set volume */ float volume = __get_volume_decibel((char*)buffer, len); __vc_mgr_set_volume(volume); - /* send audio streaming */ - int ret = vc_mgr_dbus_send_audio_streaming(g_vc_m->handle, event, buffer, len); - if (0 != ret) { + ret = vc_mgr_dbus_send_audio_streaming(g_vc_m->handle, event, buffer, len); + if (0 != ret) SLOG(LOG_WARN, TAG_VCM, "[WARNING] retry to send audio streaming data"); - } else { + else SLOG(LOG_INFO, TAG_VCM, "[DEBUG] Success to send"); - } - return ret; } -int vc_mgr_set_audio_streaming_mode(vc_audio_streaming_mode_e streaming_mode) +int vc_mgr_set_audio_streaming_mode(vc_audio_streaming_mode_e mode) { SLOG(LOG_INFO, TAG_VCM, "[Manager] Set multi assistant mode"); @@ -4488,22 +4492,41 @@ int vc_mgr_set_audio_streaming_mode(vc_audio_streaming_mode_e streaming_mode) return VC_ERROR_PERMISSION_DENIED; } - vc_state_e state; - if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) { + if (VC_AUDIO_STREAMING_MODE_VC_SERVICE > mode || VC_AUDIO_STREAMING_MODE_OUTSIDE < mode) { + SLOG(LOG_ERROR, TAG_VCM, "[ERROR] mode is invalid parameter (%d)", mode); + return VC_ERROR_INVALID_PARAMETER; + } + + vc_state_e state = VC_STATE_NONE; + int ret = vc_mgr_client_get_client_state(g_vc_m, &state); + if (0 != ret) { SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available"); SLOG(LOG_DEBUG, TAG_VCM, "@@@"); return VC_ERROR_INVALID_STATE; } - /* check state */ - if (state != VC_STATE_INITIALIZED) { + if (state != VC_STATE_READY) { + SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid State: Current state is not 'READY'"); + SLOG(LOG_DEBUG, TAG_VCM, "@@@"); + return VC_ERROR_INVALID_STATE; + } + + vc_service_state_e service_state = VC_SERVICE_STATE_NONE; + ret = vc_mgr_client_get_service_state(g_vc_m, &service_state); + if (0 != ret) { + SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available"); + SLOG(LOG_DEBUG, TAG_VCM, "@@@"); + return VC_ERROR_INVALID_STATE; + } + if (VC_STATE_INITIALIZED != state && VC_SERVICE_STATE_READY != service_state) { SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid State: Current state is not 'INITIALIZED', state(%d)", state); + SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid State: Current service state is not 'READY', service_state(%d)", service_state); SLOG(LOG_DEBUG, TAG_VCM, "@@@"); return VC_ERROR_INVALID_STATE; } - int ret = vc_mgr_client_set_audio_streaming_mode(g_vc_m, streaming_mode); + ret = vc_mgr_client_set_audio_streaming_mode(g_vc_m, mode); if (0 != ret) { SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to set multi assistant mode, ret(%d)", ret); return VC_ERROR_INVALID_STATE; @@ -4621,9 +4644,9 @@ int __vc_recover_system_volume() return 0; } -int vc_mgr_change_system_volume(vc_system_volume_event_e volume_event) +int vc_mgr_change_system_volume(vc_system_volume_event_e event) { - SLOG(LOG_INFO, TAG_VCM, "[Manager] Change system volume, volume_event(%d)", volume_event); + SLOG(LOG_INFO, TAG_VCM, "[Manager] Change system volume"); if (0 != __vc_mgr_get_feature_enabled()) { SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] not supported"); @@ -4634,31 +4657,34 @@ int vc_mgr_change_system_volume(vc_system_volume_event_e volume_event) return VC_ERROR_PERMISSION_DENIED; } + if (VC_SYSTEM_VOLUME_EVENT_CHANGE_FOR_NEARFIELD > event || VC_SYSTEM_VOLUME_EVENT_CHANGE_FOR_FARFIELD < event) { + SLOG(LOG_ERROR, TAG_VCM, "[ERROR] event is invalid parameter (%d)", event); + return VC_ERROR_INVALID_PARAMETER; + } + vc_state_e state; - if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) { + int ret = vc_mgr_client_get_client_state(g_vc_m, &state); + if (0 != ret) { SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available"); SLOG(LOG_DEBUG, TAG_VCM, "@@@"); return VC_ERROR_INVALID_STATE; } - /* check state */ if (state != VC_STATE_READY && state != VC_STATE_INITIALIZED) { SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid State: Current state is not 'READY' and not 'INITIALIZED', state(%d)", state); SLOG(LOG_DEBUG, TAG_VCM, "@@@"); return VC_ERROR_INVALID_STATE; } - /* change system volume */ - int ret = __vc_change_system_volume(volume_event); - if (0 != ret) { + ret = __vc_change_system_volume(event); + if (0 != ret) SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to change volume"); - } else { + else SLOG(LOG_INFO, TAG_VCM, "[DEBUG] Success to change volume"); - } return ret; } -int vc_mgr_recover_system_volume() +int vc_mgr_recover_system_volume(void) { SLOG(LOG_INFO, TAG_VCM, "[Manager] recover system volume"); @@ -4671,14 +4697,14 @@ int vc_mgr_recover_system_volume() return VC_ERROR_PERMISSION_DENIED; } - vc_state_e state; - if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) { + vc_state_e state = VC_STATE_NONE; + int ret = vc_mgr_client_get_client_state(g_vc_m, &state); + if (0 != ret) { SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available"); SLOG(LOG_DEBUG, TAG_VCM, "@@@"); return VC_ERROR_INVALID_STATE; } - /* check state */ if (state != VC_STATE_READY && state != VC_STATE_INITIALIZED) { SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid State: Current state is not 'READY' and not 'INITIALIZED', state(%d)", state); SLOG(LOG_DEBUG, TAG_VCM, "@@@"); @@ -4686,11 +4712,10 @@ int vc_mgr_recover_system_volume() } /* recover volume */ - int ret = __vc_recover_system_volume(); - if (0 != ret) { + ret = __vc_recover_system_volume(); + if (0 != ret) SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to recover volume"); - } else { + else SLOG(LOG_INFO, TAG_VCM, "[DEBUG] Success to recover volume"); - } return ret; } diff --git a/client/vc_mgr_dbus.c b/client/vc_mgr_dbus.c index eb6d62e..486f2fe 100755 --- a/client/vc_mgr_dbus.c +++ b/client/vc_mgr_dbus.c @@ -2306,7 +2306,7 @@ int vc_mgr_dbus_send_utterance_status(int pid, int utt_id, int utt_status) return 0; } -int vc_mgr_dbus_send_audio_streaming(int pid, vc_audio_streaming_event_e event, unsigned char* buffer, unsigned int len) +int vc_mgr_dbus_send_audio_streaming(int pid, vc_audio_streaming_event_e event, char* buffer, unsigned int len) { if (0 != __dbus_check()) { return VC_ERROR_OPERATION_FAILED; diff --git a/client/vc_mgr_dbus.h b/client/vc_mgr_dbus.h index e0f5942..da556d3 100644 --- a/client/vc_mgr_dbus.h +++ b/client/vc_mgr_dbus.h @@ -74,7 +74,7 @@ int vc_mgr_dbus_request_stop_feedback(int pid); int vc_mgr_dbus_send_utterance_status(int pid, int utt_id, int utt_status); -int vc_mgr_dbus_send_audio_streaming(int pid, vc_audio_streaming_event_e event, unsigned char* buffer, unsigned int len); +int vc_mgr_dbus_send_audio_streaming(int pid, vc_audio_streaming_event_e event, char* buffer, unsigned int len); int vc_mgr_dbus_change_system_volume(int pid, vc_system_volume_event_e volume_event); diff --git a/include/voice_control_manager_internal.h b/include/voice_control_manager_internal.h index 2a887ef..4d6cc27 100644 --- a/include/voice_control_manager_internal.h +++ b/include/voice_control_manager_internal.h @@ -42,8 +42,7 @@ typedef enum { typedef enum { VC_SYSTEM_VOLUME_EVENT_CHANGE_FOR_NEARFIELD, - VC_SYSTEM_VOLUME_EVENT_CHANGE_FOR_FARFIELD, - VC_SYSTEM_VOLUME_EVENT_RECOVER + VC_SYSTEM_VOLUME_EVENT_CHANGE_FOR_FARFIELD } vc_system_volume_event_e; #define VC_SERVICE_STATE_UPDATING 5 /**< 'Updating' state */ @@ -104,7 +103,7 @@ int vc_mgr_set_domain(const char* domain); * @since_tizen 5.0 * */ -int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, unsigned char* buffer, unsigned int len); +int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, char* buffer, unsigned int len); int vc_mgr_set_audio_streaming_mode(vc_audio_streaming_mode_e streaming_mode); diff --git a/server/vcd_dbus_server.c b/server/vcd_dbus_server.c index 2adb89e..119d5f8 100755 --- a/server/vcd_dbus_server.c +++ b/server/vcd_dbus_server.c @@ -1046,7 +1046,7 @@ int vcd_dbus_server_mgr_send_audio_streaming(DBusConnection* conn, DBusMessage* int pid = 0; int event = 0; - unsigned char* buffer = NULL; + char* buffer = NULL; unsigned int len = 0; int ret = VCD_ERROR_OPERATION_FAILED; diff --git a/server/vcd_server.c b/server/vcd_server.c index 56df9a5..6913285 100755 --- a/server/vcd_server.c +++ b/server/vcd_server.c @@ -2307,7 +2307,7 @@ int vcd_server_mgr_stop_feedback(void) return VCD_ERROR_NONE; } -int vcd_server_mgr_send_audio_streaming(int pid, int event, unsigned char* buffer, unsigned int len) +int vcd_server_mgr_send_audio_streaming(int pid, int event, char* buffer, unsigned int len) { SLOG(LOG_INFO, TAG_VCD, "[DEBUG] Send Audio Streaming from Multi-assistant. event(%d), buffer(%p), len(%d)", event, &buffer, len); diff --git a/server/vcd_server.h b/server/vcd_server.h index 23ec32a..e675b0b 100644 --- a/server/vcd_server.h +++ b/server/vcd_server.h @@ -87,7 +87,7 @@ int vcd_server_mgr_start_feedback(void); int vcd_server_mgr_stop_feedback(void); /* for Multi-assistant */ -int vcd_server_mgr_send_audio_streaming(int pid, int event, unsigned char* buffer, unsigned int len); +int vcd_server_mgr_send_audio_streaming(int pid, int event, char* buffer, unsigned int len); /* -- 2.7.4 From 76b88d002760d8aa747b09292cdbf246ae89bc16 Mon Sep 17 00:00:00 2001 From: sungrae jo Date: Mon, 30 Mar 2020 10:53:37 +0900 Subject: [PATCH 04/16] Update version to 1.60.6 Change-Id: I88c9a6821617005e566b9e22eb0f3bb457f8ae0d Signed-off-by: sungrae jo --- CMakeLists.txt | 2 +- packaging/voice-control.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0132f8..4b63cf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ PROJECT(vc) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "${PREFIX}") -SET(VERSION 1.60.5) +SET(VERSION 1.60.6) FIND_PROGRAM(UNAME NAMES uname) EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") diff --git a/packaging/voice-control.spec b/packaging/voice-control.spec index 1c35223..b099c4e 100644 --- a/packaging/voice-control.spec +++ b/packaging/voice-control.spec @@ -1,6 +1,6 @@ Name: voice-control Summary: Voice control client library and daemon -Version: 1.60.5 +Version: 1.60.6 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Apache-2.0 -- 2.7.4 From cf760861bb9b1219a75e62729f813b343c84a1ef Mon Sep 17 00:00:00 2001 From: sungrae jo Date: Tue, 31 Mar 2020 12:51:13 +0900 Subject: [PATCH 05/16] Changed VC mgr internal state for vc_mgr_set_audio_streaming_mode vc_mgr_set_audio_streaming_mode will be using VC_STATE_INITIALIZED or VC_SERVICE_STATE_READY. Change-Id: Ia5e36362f898f632d0fa8bcc744e447717abf81f Signed-off-by: sungrae jo --- client/vc_mgr.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/client/vc_mgr.c b/client/vc_mgr.c index 48dc9f9..84c69b8 100755 --- a/client/vc_mgr.c +++ b/client/vc_mgr.c @@ -4517,12 +4517,6 @@ int vc_mgr_set_audio_streaming_mode(vc_audio_streaming_mode_e mode) return VC_ERROR_INVALID_STATE; } - if (state != VC_STATE_READY) { - SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid State: Current state is not 'READY'"); - SLOG(LOG_DEBUG, TAG_VCM, "@@@"); - return VC_ERROR_INVALID_STATE; - } - vc_service_state_e service_state = VC_SERVICE_STATE_NONE; ret = vc_mgr_client_get_service_state(g_vc_m, &service_state); if (0 != ret) { -- 2.7.4 From c5d4a6b38467c29c6c768258454f6c984512f960 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Wed, 1 Apr 2020 15:06:10 +0900 Subject: [PATCH 06/16] Add log to analyze easily Change-Id: Icf91294f6dbd992d63a0b26c118d3965dff4e6d2 --- client/vc_mgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/vc_mgr.c b/client/vc_mgr.c index 84c69b8..40e5d15 100755 --- a/client/vc_mgr.c +++ b/client/vc_mgr.c @@ -4431,7 +4431,7 @@ static float __get_volume_decibel(char* data, int size) int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, char* buffer, unsigned int len) { - SLOG(LOG_INFO, TAG_VCM, "[Manager] Send audio streaming to the engine service"); + SLOG(LOG_INFO, TAG_VCM, "[Manager] Send audio streaming to the engine service, event(%d)", event); if (0 != __vc_mgr_get_feature_enabled()) { SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] not supported"); @@ -4493,7 +4493,7 @@ int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, char* buffer, int vc_mgr_set_audio_streaming_mode(vc_audio_streaming_mode_e mode) { - SLOG(LOG_INFO, TAG_VCM, "[Manager] Set multi assistant mode"); + SLOG(LOG_INFO, TAG_VCM, "[Manager] Set multi assistant mode, mode(%d)", mode); if (0 != __vc_mgr_get_feature_enabled()) { SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] not supported"); -- 2.7.4 From 1baf38236e48681675e0229fb82cd6ee2ae1e7dc Mon Sep 17 00:00:00 2001 From: sungrae jo Date: Mon, 16 Mar 2020 19:10:43 +0900 Subject: [PATCH 07/16] Added vc_mgr_send_utterance_status for voice control manager header. Change-Id: I7e3852a8ed721199a21acafb52ad8a7bb025f609 Signed-off-by: sungrae jo --- include/voice_control_manager.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/voice_control_manager.h b/include/voice_control_manager.h index 3d4ece3..2abd2c4 100644 --- a/include/voice_control_manager.h +++ b/include/voice_control_manager.h @@ -1758,6 +1758,31 @@ int vc_mgr_set_vc_tts_streaming_cb(vc_mgr_vc_tts_streaming_cb callback, void* us */ int vc_mgr_unset_vc_tts_streaming_cb(void); +/** + * @platform + * @brief Sends the utterance status to the VC client. + * @since_tizen 6.0 + * + * @privlevel platform + * @privilege %http://tizen.org/privilege/voicecontrol.manager + * + * @param[in] pid The process id of the VC client + * @param[in] utt_id The utterance id + * @param[in] utt_status The utterance status + * + * @return 0 on success, otherwise a negative error value + * @retval #VC_ERROR_NONE Successful + * @retval #VC_ERROR_NOT_SUPPORTED VC not supported + * @retval #VC_ERROR_PERMISSION_DENIED Permission denied + * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #VC_ERROR_OUT_OF_MEMORY Not enough memory + * @retval #VC_ERROR_INVALID_STATE Invalid state + * @retval #VC_ERROR_OPERATION_FAILED Operation fail + * + * @pre The service state should be #VC_SERVICE_STATE_READY. + */ +int vc_mgr_send_utterance_status(int pid, int utt_id, vc_tts_utterance_status_e utt_status); + #ifdef __cplusplus } -- 2.7.4 From 0839f9266d89e1f4280db120c68a3d494be87ea3 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Wed, 1 Apr 2020 15:09:28 +0900 Subject: [PATCH 08/16] Update version to 1.60.7 Change-Id: Idb4c80b9b7f99d00aa1123345f97e44110736d18 --- CMakeLists.txt | 2 +- packaging/voice-control.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b63cf0..b8ccc24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ PROJECT(vc) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "${PREFIX}") -SET(VERSION 1.60.6) +SET(VERSION 1.60.7) FIND_PROGRAM(UNAME NAMES uname) EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") diff --git a/packaging/voice-control.spec b/packaging/voice-control.spec index b099c4e..3328c35 100644 --- a/packaging/voice-control.spec +++ b/packaging/voice-control.spec @@ -1,6 +1,6 @@ Name: voice-control Summary: Voice control client library and daemon -Version: 1.60.6 +Version: 1.60.7 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Apache-2.0 -- 2.7.4 From f67db1372a1e9acbac4f5b4604ed05f38e8918ca Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Mon, 13 Apr 2020 10:06:45 +0900 Subject: [PATCH 09/16] Initialize values after use Crash was happened due to memory corruption on fd handler. Because fd handler was deleted, but it was not initialized, it could be used even if it was checked by NULL. Change-Id: Ic261af84e52608f083ec10f12637579b4266b8dd --- common/vc_config_mgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/vc_config_mgr.c b/common/vc_config_mgr.c index 2a34402..c8988a8 100644 --- a/common/vc_config_mgr.c +++ b/common/vc_config_mgr.c @@ -1120,6 +1120,9 @@ int __vc_config_mgr_unregister_config_event() ecore_main_fd_handler_del(g_fd_handler_lang); inotify_rm_watch(g_fd_lang, g_wd_lang); close(g_fd_lang); + g_fd_handler_lang = NULL; + g_wd_lang = NULL; + g_fd_lang = NULL; vconf_ignore_key_changed(VCONFKEY_LANGSET, __vc_config_language_changed_cb); } -- 2.7.4 From 3e5341178bab79d8ff5c442a0bb45a9ff0adf355 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Thu, 16 Apr 2020 10:09:03 +0900 Subject: [PATCH 10/16] Update version to 1.60.8 Change-Id: Ic1fb807db006a2cca0290bf114f556e449711f99 --- CMakeLists.txt | 2 +- packaging/voice-control.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8ccc24..686f357 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ PROJECT(vc) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "${PREFIX}") -SET(VERSION 1.60.7) +SET(VERSION 1.60.8) FIND_PROGRAM(UNAME NAMES uname) EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") diff --git a/packaging/voice-control.spec b/packaging/voice-control.spec index 3328c35..33499f2 100644 --- a/packaging/voice-control.spec +++ b/packaging/voice-control.spec @@ -1,6 +1,6 @@ Name: voice-control Summary: Voice control client library and daemon -Version: 1.60.7 +Version: 1.60.8 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Apache-2.0 -- 2.7.4 From f59559eadfc7d96864087dae8a32f782ca9bc6d9 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Thu, 16 Apr 2020 14:09:34 +0900 Subject: [PATCH 11/16] Fix wrong initialize value Change-Id: I6889e8e2d3a8dcd1fccd66d2698707752c7064eb --- common/vc_config_mgr.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/common/vc_config_mgr.c b/common/vc_config_mgr.c index c8988a8..5d5fd12 100644 --- a/common/vc_config_mgr.c +++ b/common/vc_config_mgr.c @@ -63,8 +63,8 @@ static vc_config_s* g_config_info; static int g_lang_ref_count; static Ecore_Fd_Handler* g_fd_handler_lang = NULL; -static int g_fd_lang; -static int g_wd_lang; +static int g_fd_lang = -1; +static int g_wd_lang = -1; static GList* g_ino_list = NULL; @@ -577,12 +577,17 @@ Eina_Bool vc_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handle { SLOG(LOG_DEBUG, vc_config_tag(), "@@@ Config changed callback event"); + if (g_fd_lang < 0) { + SLOG(LOG_WARN, vc_config_tag(), "[WARN] FD for config file is closed"); + SLOG(LOG_DEBUG, vc_config_tag(), "@@@"); + return ECORE_CALLBACK_PASS_ON; + } + int length; struct inotify_event event; memset(&event, '\0', sizeof(struct inotify_event)); length = read(g_fd_lang, &event, sizeof(struct inotify_event)); - if (0 > length) { SLOG(LOG_ERROR, vc_config_tag(), "[ERROR] Empty Inotify event"); SLOG(LOG_DEBUG, vc_config_tag(), "@@@"); @@ -1121,8 +1126,7 @@ int __vc_config_mgr_unregister_config_event() inotify_rm_watch(g_fd_lang, g_wd_lang); close(g_fd_lang); g_fd_handler_lang = NULL; - g_wd_lang = NULL; - g_fd_lang = NULL; + g_fd_lang = -1; vconf_ignore_key_changed(VCONFKEY_LANGSET, __vc_config_language_changed_cb); } -- 2.7.4 From dbc1961a5ec3eb506588cd50cc95e57dad2f114c Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Thu, 16 Apr 2020 15:25:32 +0900 Subject: [PATCH 12/16] Use buffer size as minimum value of buffer_size and BUFFER_LENGTH buffer_size can be different from BUFFER_LENGTH. However, if buffer_size is bigger than BUFFER_LENGTH, buffer overflow can be occured. Thus, I use minimum value of buffer_size and BUFFER_LENGTH as parameter. And also, this patch pass the same variable to g_audio_cb and get_volume_decibel. Change-Id: I1231f056226415e820b079da3241e5ee82f8793d Signed-off-by: Suyeon Hwang --- server/vcd_recorder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/vcd_recorder.c b/server/vcd_recorder.c index bfa8fd3..a2d2648 100644 --- a/server/vcd_recorder.c +++ b/server/vcd_recorder.c @@ -777,10 +777,12 @@ Eina_Bool __read_test_func(void *data) if (buffer_size != BUFFER_LENGTH) SLOG(LOG_DEBUG, TAG_VCD, "[Recorder test] Get data size(%d)", buffer_size); + buffer_size = MIN(buffer_size, BUFFER_LENGTH); + if (NULL != g_audio_cb && buffer_size != 0) g_audio_cb(buffer, buffer_size); - float vol_db = get_volume_decibel(buffer, BUFFER_LENGTH); + float vol_db = get_volume_decibel(buffer, buffer_size); if (0 != vcdc_send_set_volume(vcd_client_manager_get_pid(), vol_db)) SLOG(LOG_ERROR, TAG_VCD, "[Recorder test] Fail to send recording volume(%f)", vol_db); -- 2.7.4 From d544da971e0a3c30676a2edf1af7bd19ad666aeb Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Thu, 16 Apr 2020 18:22:25 +0900 Subject: [PATCH 13/16] Update version to 1.60.9 Change-Id: I91b3abcb3241c1553fd5467c5c5ee517a1bd912b --- CMakeLists.txt | 2 +- packaging/voice-control.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 686f357..27c15fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ PROJECT(vc) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "${PREFIX}") -SET(VERSION 1.60.8) +SET(VERSION 1.60.9) FIND_PROGRAM(UNAME NAMES uname) EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") diff --git a/packaging/voice-control.spec b/packaging/voice-control.spec index 33499f2..7c5fcbd 100644 --- a/packaging/voice-control.spec +++ b/packaging/voice-control.spec @@ -1,6 +1,6 @@ Name: voice-control Summary: Voice control client library and daemon -Version: 1.60.8 +Version: 1.60.9 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Apache-2.0 -- 2.7.4 From e8535fab6d2e44665cbcda01c43d58a02baf1dae Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Thu, 16 Apr 2020 21:23:11 +0900 Subject: [PATCH 14/16] Change type to 'unsigned char' Change-Id: Iaaf52f5cf85fcdd927524c61c951320f285abd44 --- client/vc_mgr.c | 2 +- client/vc_mgr_dbus.c | 2 +- client/vc_mgr_dbus.h | 2 +- include/voice_control_manager_internal.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/vc_mgr.c b/client/vc_mgr.c index 40e5d15..7acde3c 100755 --- a/client/vc_mgr.c +++ b/client/vc_mgr.c @@ -4429,7 +4429,7 @@ static float __get_volume_decibel(char* data, int size) return db; } -int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, char* buffer, unsigned int len) +int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, unsigned char* buffer, unsigned int len) { SLOG(LOG_INFO, TAG_VCM, "[Manager] Send audio streaming to the engine service, event(%d)", event); diff --git a/client/vc_mgr_dbus.c b/client/vc_mgr_dbus.c index 7eb61e8..f9a5493 100755 --- a/client/vc_mgr_dbus.c +++ b/client/vc_mgr_dbus.c @@ -2306,7 +2306,7 @@ int vc_mgr_dbus_send_utterance_status(int pid, int utt_id, vc_tts_utterance_stat return 0; } -int vc_mgr_dbus_send_audio_streaming(int pid, vc_audio_streaming_event_e event, char* buffer, unsigned int len) +int vc_mgr_dbus_send_audio_streaming(int pid, vc_audio_streaming_event_e event, unsigned char* buffer, unsigned int len) { if (0 != __dbus_check()) { return VC_ERROR_OPERATION_FAILED; diff --git a/client/vc_mgr_dbus.h b/client/vc_mgr_dbus.h index 0b3d87c..7d706f1 100644 --- a/client/vc_mgr_dbus.h +++ b/client/vc_mgr_dbus.h @@ -74,7 +74,7 @@ int vc_mgr_dbus_request_stop_feedback(int pid); int vc_mgr_dbus_send_utterance_status(int pid, int utt_id, vc_tts_utterance_status_e utt_status); -int vc_mgr_dbus_send_audio_streaming(int pid, vc_audio_streaming_event_e event, char* buffer, unsigned int len); +int vc_mgr_dbus_send_audio_streaming(int pid, vc_audio_streaming_event_e event, unsigned char* buffer, unsigned int len); int vc_mgr_dbus_change_system_volume(int pid, vc_system_volume_event_e volume_event); diff --git a/include/voice_control_manager_internal.h b/include/voice_control_manager_internal.h index 4d6cc27..627f025 100644 --- a/include/voice_control_manager_internal.h +++ b/include/voice_control_manager_internal.h @@ -103,7 +103,7 @@ int vc_mgr_set_domain(const char* domain); * @since_tizen 5.0 * */ -int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, char* buffer, unsigned int len); +int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, unsigned char* buffer, unsigned int len); int vc_mgr_set_audio_streaming_mode(vc_audio_streaming_mode_e streaming_mode); -- 2.7.4 From 48f06a207625834664046ccb851a0530a7165f98 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Thu, 16 Apr 2020 21:32:36 +0900 Subject: [PATCH 15/16] Update version to 1.60.10 Change-Id: Ifd07f5baac75cce5b0c55c46c268c074397e8680 --- CMakeLists.txt | 2 +- packaging/voice-control.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27c15fb..adf6a88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ PROJECT(vc) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "${PREFIX}") -SET(VERSION 1.60.9) +SET(VERSION 1.60.10) FIND_PROGRAM(UNAME NAMES uname) EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") diff --git a/packaging/voice-control.spec b/packaging/voice-control.spec index 7c5fcbd..b5d2598 100644 --- a/packaging/voice-control.spec +++ b/packaging/voice-control.spec @@ -1,6 +1,6 @@ Name: voice-control Summary: Voice control client library and daemon -Version: 1.60.9 +Version: 1.60.10 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Apache-2.0 -- 2.7.4 From feff5bb00f0c5e44002065ba6140a5bb1c04f660 Mon Sep 17 00:00:00 2001 From: sungrae jo Date: Fri, 17 Apr 2020 13:39:40 +0900 Subject: [PATCH 16/16] Add new APIs for VC-mgr - vc_mgr_send_audio_streaming() - vc_mgr_set_audio_streaming_mode() - vc_mgr_change_background_volume() - vc_mgr_recover_background_volume() - vc_mgr_set_background_volume_ratio() Change-Id: I09dbbdf6f64ea78cb4476cf3e77adae588cb3ef0 Signed-off-by: sungrae jo --- include/voice_control_manager.h | 170 +++++++++++++++++++++++++++++++ include/voice_control_manager_internal.h | 23 ----- 2 files changed, 170 insertions(+), 23 deletions(-) diff --git a/include/voice_control_manager.h b/include/voice_control_manager.h index 1475dd7..49defd3 100644 --- a/include/voice_control_manager.h +++ b/include/voice_control_manager.h @@ -124,6 +124,36 @@ typedef enum { } vc_pre_result_event_e; /** + * @brief Enumeration of audio streaming event. + * @since_tizen 6.0 + */ +typedef enum { + VC_AUDIO_STREAMING_EVENT_FAIL = -1, /**< Failed */ + VC_AUDIO_STREAMING_EVENT_START = 1, /**< Start event */ + VC_AUDIO_STREAMING_EVENT_CONTINUE = 2, /**< Continue event */ + VC_AUDIO_STREAMING_EVENT_FINISH = 3 /**< Finish event */ +} vc_audio_streaming_event_e; + +/** + * @brief Enumeration of audio streaming mode. + * @since_tizen 6.0 + */ +typedef enum { + VC_AUDIO_STREAMING_MODE_VC_SERVICE = 0, /**< Use audio recording from VC service */ + VC_AUDIO_STREAMING_MODE_MULTI_ASSISTANT = 1, /**< Use audio streaming from multi-assistant */ + VC_AUDIO_STREAMING_MODE_OUTSIDE = 2, /**< Use audio streaming from outside */ +} vc_audio_streaming_mode_e; + +/** + * @brief Enumeration of background volume event. + * @since_tizen 6.0 + */ +typedef enum { + VC_BACKGROUND_VOLUME_EVENT_CHANGE_FOR_NEARFIELD = 0, /**< Background volume event for near-field */ + VC_BACKGROUND_VOLUME_EVENT_CHANGE_FOR_FARFIELD /**< Background volume event for far-field */ +} vc_background_volume_event_e; + +/** * @brief Called when client gets the all recognition results from voice control service. * @since_tizen 5.0 * @@ -1795,6 +1825,146 @@ int vc_mgr_unset_vc_tts_streaming_cb(void); */ int vc_mgr_send_utterance_status(int pid, int utt_id, vc_tts_utterance_status_e utt_status); +/** + * @platform + * @brief Sends audio streaming to the engine service. + * @details Using this function, the developer can send audio streaming after vc_mgr_start() function is called. + * @since_tizen 6.0 + * + * @privlevel platform + * @privilege %http://tizen.org/privilege/voicecontrol.manager + * + * @param[in] event Audio streaming event (e.g. #VC_AUDIO_STREAMING_EVENT_START, #VC_AUDIO_STREAMING_EVENT_CONTINUE) + * @param[in] buffer Audio streaming data + * @param[in] len Length of the audio streaming data + * + * @return 0 on success, otherwise a negative error value + * @retval #VC_ERROR_NONE Successful + * @retval #VC_ERROR_NOT_SUPPORTED VC not supported + * @retval #VC_ERROR_PERMISSION_DENIED Permission denied + * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #VC_ERROR_OUT_OF_MEMORY Not enough memory + * @retval #VC_ERROR_INVALID_STATE Invalid state + * @retval #VC_ERROR_OPERATION_FAILED Operation fail + * + * @pre The state should be #VC_SERVICE_STATE_RECORDING. + * + * @see vc_mgr_set_audio_streaming_mode() + */ +int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, unsigned char *buffer, unsigned int len); + +/** + * @platform + * @brief Sets audio streaming mode. + * @since_tizen 6.0 + * + * @privlevel platform + * @privilege %http://tizen.org/privilege/voicecontrol.manager + * + * @remarks The default audio streaming mode is #VC_AUDIO_STREAMING_MODE_VC_SERVICE. \n + * If you want to use other mode, you can set mode with vc_mgr_set_audio_streaming_mode(). + * + * @param[in] mode Audio streaming mode + * + * @return 0 on success, otherwise a negative error value + * @retval #VC_ERROR_NONE Successful + * @retval #VC_ERROR_NOT_SUPPORTED VC not supported + * @retval #VC_ERROR_PERMISSION_DENIED Permission denied + * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #VC_ERROR_INVALID_STATE Invalid state + * @retval #VC_ERROR_OPERATION_FAILED Operation fail + * + * @pre The state should be #VC_STATE_INITIALIZED or #VC_SERVICE_STATE_READY. + * + * @see vc_mgr_send_audio_streaming() + */ +int vc_mgr_set_audio_streaming_mode(vc_audio_streaming_mode_e mode); + +/** + * @platform + * @brief Changes background volume. + * @since_tizen 6.0 + * + * @privlevel public + * @privilege %http://tizen.org/privilege/volume.set + * + * @privlevel platform + * @privilege %http://tizen.org/privilege/voicecontrol.manager + * + * @remarks If @a event is #VC_BACKGROUND_VOLUME_EVENT_CHANGE_FOR_NEARFIELD, the background volume will be reduced by 70%. + * And, if @a event is #VC_BACKGROUND_VOLUME_EVENT_CHANGE_FOR_FARFIELD, the background volume will be muted. + * + * @param[in] event The background volume event + * + * @return 0 on success, otherwise a negative error value + * @retval #VC_ERROR_NONE Successful + * @retval #VC_ERROR_NOT_SUPPORTED VC not supported + * @retval #VC_ERROR_PERMISSION_DENIED Permission denied + * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #VC_ERROR_INVALID_STATE Invalid state + * @retval #VC_ERROR_OPERATION_FAILED Operation fail + * + * @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY. + * + * @see vc_mgr_reset_background_volume() + * @see vc_mgr_change_background_volume_by_ratio() + */ +int vc_mgr_change_background_volume(vc_background_volume_event_e event); + +/** + * @platform + * @brief Changes background volume ratio. + * @details Calling this function sets the background volume to a given percentage of its current value. + * @since_tizen 6.0 + * + * @privlevel public + * @privilege %http://tizen.org/privilege/volume.set + * + * @privlevel platform + * @privilege %http://tizen.org/privilege/voicecontrol.manager + * + * @param[in] ratio Current background volume ratio (Range 0.0 ~ 1.0) + * + * @return 0 on success, otherwise a negative error value + * @retval #VC_ERROR_NONE Successful + * @retval #VC_ERROR_NOT_SUPPORTED VC not supported + * @retval #VC_ERROR_PERMISSION_DENIED Permission denied + * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #VC_ERROR_INVALID_STATE Invalid state + * @retval #VC_ERROR_OPERATION_FAILED Operation fail + * + * @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY. + * + * @see vc_mgr_change_background_volume() + * @see vc_mgr_reset_background_volume() + */ +int vc_mgr_change_background_volume_by_ratio(double ratio); + +/** + * @platform + * @brief Resets background volume. + * @details This function reverts all changes made by vc_mgr_change_background_volume() and vc_mgr_change_background_volume_by_ratio(). + * @since_tizen 6.0 + * + * @privlevel public + * @privilege %http://tizen.org/privilege/volume.set + * + * @privlevel platform + * @privilege %http://tizen.org/privilege/voicecontrol.manager + * + * @return 0 on success, otherwise a negative error value + * @retval #VC_ERROR_NONE Successful + * @retval #VC_ERROR_NOT_SUPPORTED VC not supported + * @retval #VC_ERROR_PERMISSION_DENIED Permission denied + * @retval #VC_ERROR_INVALID_STATE Invalid state + * @retval #VC_ERROR_OPERATION_FAILED Operation fail + * + * @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY. + * + * @see vc_mgr_change_background_volume() + * @see vc_mgr_change_background_volume_by_ratio() + */ +int vc_mgr_reset_background_volume(void); #ifdef __cplusplus } diff --git a/include/voice_control_manager_internal.h b/include/voice_control_manager_internal.h index 627f025..b86be95 100644 --- a/include/voice_control_manager_internal.h +++ b/include/voice_control_manager_internal.h @@ -28,19 +28,6 @@ extern "C" #endif typedef enum { - VC_AUDIO_STREAMING_EVENT_FAIL = -1, /**< Failed */ - VC_AUDIO_STREAMING_EVENT_START = 1, /**< Start event */ - VC_AUDIO_STREAMING_EVENT_CONTINUE = 2, /**< Continue event */ - VC_AUDIO_STREAMING_EVENT_FINISH = 3 /**< Finish event */ -} vc_audio_streaming_event_e; - -typedef enum { - VC_AUDIO_STREAMING_MODE_VC_SERVICE = 0, /**< Use audio recording from vc service */ - VC_AUDIO_STREAMING_MODE_MULTI_ASSISTANT = 1, /**< Use audio streaming from multi-assistant */ - VC_AUDIO_STREAMING_MODE_OUTSIDE = 2, /**< Use audio streaming from outside */ -} vc_audio_streaming_mode_e; - -typedef enum { VC_SYSTEM_VOLUME_EVENT_CHANGE_FOR_NEARFIELD, VC_SYSTEM_VOLUME_EVENT_CHANGE_FOR_FARFIELD } vc_system_volume_event_e; @@ -99,16 +86,6 @@ int vc_mgr_unset_demandable_client_rule(void); int vc_mgr_set_domain(const char* domain); /** - * @brief Sends audio streaming to the engine service. - * @since_tizen 5.0 - * - */ -int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, unsigned char* buffer, unsigned int len); - -int vc_mgr_set_audio_streaming_mode(vc_audio_streaming_mode_e streaming_mode); - - -/** * @brief Changes system volume. * @since_tizen 5.0 * -- 2.7.4