[ITC][stt][Non-ACR] Set reserved key for working engine as test mode 81/271581/2
authorSuyeon Hwang <stom.hwang@samsung.com>
Wed, 23 Feb 2022 06:40:42 +0000 (15:40 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Thu, 24 Feb 2022 04:39:16 +0000 (13:39 +0900)
Change-Id: I342a8efe1154526ac3c11fdef838f752e7871ae1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
src/itc/stt/ITs-stt.c

index 74a9f756d2f7ef0082d1f76df7028b24c5d093a3..2923631e44775a3cb53cdf32dd9090fec736bdf9 100755 (executable)
@@ -2104,6 +2104,16 @@ int ITc_stt_set_unset_recognition_result_cb_p(void)
                        return 1;
                }
 
+               nRet = stt_set_private_data(g_hStt, "stt_verification", "true");
+               if ( nRet != STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] stt_set_private_data failed for TC mode, error returned = %s\\n",
+                               __LINE__, API_NAMESPACE,  SttGetError(nRet));
+                       stt_unprepare(g_hStt);
+                       stt_unset_state_changed_cb(g_hStt);
+                       return 1;
+               }
+
                //Start recording and recognition asynchronously to invoke callback
                g_bStateCallbackOccurred = false;
                g_bCallbackParameterCheck = false;
@@ -2284,6 +2294,16 @@ int ITc_stt_set_unset_recognition_result_cb_p(void)
                        return 1;
                }
 
+               nRet = stt_set_private_data(g_hStt, "stt_verification", "true");
+               if ( nRet != STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] stt_set_private_data failed for TC mode, error returned = %s\\n",
+                               __LINE__, API_NAMESPACE,  SttGetError(nRet));
+                       stt_unprepare(g_hStt);
+                       stt_unset_state_changed_cb(g_hStt);
+                       return 1;
+               }
+
                //Start recording and recognition asynchronously to invoke callback
                g_bStateCallbackOccurred = false;
                nRet = stt_start(g_hStt, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
@@ -2546,6 +2566,16 @@ int ITc_stt_foreach_detailed_result_p(void)
                return 1;
        }
 
+       nRet = stt_set_private_data(g_hStt, "stt_verification", "true");
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] stt_set_private_data failed for TC mode, error returned = %s\\n",
+                       __LINE__, API_NAMESPACE,  SttGetError(nRet));
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+
        //Start recording and recognition asynchronously to invoke callback
        g_bStateCallbackOccurred = false;
        g_bCallbackParameterCheck = false;