+
+int stt_engine_set_audio_type(const char* audio_type)
+{
+ if (NULL == audio_type) {
+ SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Invalid parameter");
+ return STTE_ERROR_INVALID_PARAMETER;
+ }
+
+ SLOG(LOG_INFO, stt_tag(), "[Engine Info] set audio type (%s)", audio_type);
+
+ int ret = STTE_ERROR_NONE;
+ if (NULL != g_set_audio_type_cb) {
+ ret = g_set_audio_type_cb(audio_type, g_set_audio_type_user_data);
+ if (0 != ret) {
+ SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Fail to set audio type, ret(%d)", ret);
+ }
+ } else {
+ SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] There's no set audio function)");
+ }
+
+ return ret;
+}
+
+int stt_engine_set_audio_type_set_cb(stte_audio_type_cb audio_type_set_cb, void* user_data)
+{
+ if (NULL == audio_type_set_cb) {
+ SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Invalid parameter");
+ return STTE_ERROR_INVALID_PARAMETER;
+ }
+
+ g_set_audio_type_cb = audio_type_set_cb;
+ g_set_audio_type_user_data = user_data;
+
+ return 0;
+}
\ No newline at end of file