2 * Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 * http://www.apache.org/licenses/LICENSE-2.0
7 * Unless required by applicable law or agreed to in writing, software
8 * distributed under the License is distributed on an "AS IS" BASIS,
9 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 * See the License for the specific language governing permissions and
11 * limitations under the License.
16 #ifndef __STT_ENGINE_H_
17 #define __STT_ENGINE_H_
27 * STT Engine Interfaces
31 /* Register engine id */
32 int stt_engine_load(int engine_id, const char* filepath);
34 /* Unregister engine id */
35 int stt_engine_unload(int engine_id);
39 int stt_engine_initialize(int engine_id, sttpe_result_cb result_cb, sttpe_silence_detected_cb silence_cb);
41 int stt_engine_deinitialize(int engine_id);
44 int stt_engine_get_supported_langs(int engine_id, GSList** lang_list);
46 int stt_engine_is_valid_language(int engine_id, const char* language, bool *is_valid);
48 int stt_engine_get_first_language(int engine_id, char** language);
50 int stt_engine_support_silence(int engine_id, bool* support);
52 int stt_engine_need_app_credential(int engine_id, bool* need);
54 int stt_engine_support_recognition_type(int engine_id, const char* type, bool* support);
56 int stt_engine_get_audio_type(int engine_id, sttp_audio_type_e* types, int* rate, int* channels);
59 int stt_engine_set_silence_detection(int engine_id, bool value);
62 int stt_engine_check_app_agreed(int engine_id, const char* appid, bool* value);
65 int stt_engine_recognize_start(int engine_id, const char* lang, const char* recognition_type, const char* credential, void* user_param);
67 int stt_engine_set_recording_data(int engine_id, const void* data, unsigned int length);
69 int stt_engine_recognize_stop(int engine_id);
71 int stt_engine_recognize_cancel(int engine_id);
73 int stt_engine_foreach_result_time(int engine_id, void* time_info, sttpe_result_time_cb callback, void* user_data);
76 /* File recognition */
77 int stt_engine_recognize_start_file(int engine_id, const char* lang, const char* recognition_type,
78 const char* filepath, sttp_audio_type_e audio_type, int sample_rate, void* user_param);
80 int stt_engine_recognize_cancel_file(int engine_id);
87 #endif /* __STT_ENGINE_H_ */