return;
}
- /* Notify uid state change */
- sttdc_send_set_state(uid, APP_STATE_RECORDING);
-
- SLOG(LOG_DEBUG, TAG_STTD, "[Server SUCCESS] Start recognition");
+ app_state_e temp_app_state;
+ sttd_client_get_state(uid, &temp_app_state);
+ if (APP_STATE_READY != temp_app_state && 0 != stt_client_get_current_recognition()) {
+ /* Notify uid state change */
+ sttdc_send_set_state(uid, APP_STATE_RECORDING);
+ SLOG(LOG_DEBUG, TAG_STTD, "[Server SUCCESS] Start recognition");
+ }
}
void __sttd_start_sound_completed_cb(int id, void *user_data)
g_recording_log_count = 0;
+ app_state_e temp_app_state;
+
if (true == is_sound_done) {
SLOG(LOG_DEBUG, TAG_STTD, "[Server] No sound play");
return ret;
}
- /* Notify uid state change */
- sttdc_send_set_state(uid, APP_STATE_RECORDING);
+ sttd_client_get_state(uid, &temp_app_state);
+ if (APP_STATE_READY != temp_app_state && 0 != stt_client_get_current_recognition()) {
+ /* Notify uid state change */
+ sttdc_send_set_state(uid, APP_STATE_RECORDING);
+ }
SLOG(LOG_DEBUG, TAG_STTD, "[Server SUCCESS] Start recognition");
return STTD_RESULT_STATE_DONE;