1c5e268c6Sopenharmony_ci/*
2c5e268c6Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
3c5e268c6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4c5e268c6Sopenharmony_ci * you may not use this file except in compliance with the License.
5c5e268c6Sopenharmony_ci * You may obtain a copy of the License at
6c5e268c6Sopenharmony_ci *
7c5e268c6Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8c5e268c6Sopenharmony_ci *
9c5e268c6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10c5e268c6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11c5e268c6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12c5e268c6Sopenharmony_ci * See the License for the specific language governing permissions and
13c5e268c6Sopenharmony_ci * limitations under the License.
14c5e268c6Sopenharmony_ci */
15c5e268c6Sopenharmony_ci
16c5e268c6Sopenharmony_ci/**
17c5e268c6Sopenharmony_ci * @addtogroup HdiIntelligentVoiceEngine
18c5e268c6Sopenharmony_ci * @{
19c5e268c6Sopenharmony_ci *
20c5e268c6Sopenharmony_ci * @brief Provides unified APIs for intelligent voice framework services to access intelligent voice engine drivers.
21c5e268c6Sopenharmony_ci *
22c5e268c6Sopenharmony_ci * An intelligent voice framework service can obtain an intelligent voice engine driver object or agent and then call APIs provided by this object or agent to
23c5e268c6Sopenharmony_ci * access different types of intelligent voice engine devices based on the intelligent voice engine IDs, thereby obtaining or sending intelligent voice engine information,
24c5e268c6Sopenharmony_ci * creating or releasing an intelligent voice engine adapter, attaching or detaching the intelligent voice engine,
25c5e268c6Sopenharmony_ci * starting or stopping the intelligent voice engine, setting parameter to or getting parameter from the intelligent voice engine, 
26c5e268c6Sopenharmony_ci * writing audio or reading files from the intelligent voice engine, subscribing callback to the intelligent voice engine.
27c5e268c6Sopenharmony_ci *
28c5e268c6Sopenharmony_ci * @since 4.0
29c5e268c6Sopenharmony_ci * @version 1.2
30c5e268c6Sopenharmony_ci */
31c5e268c6Sopenharmony_ci
32c5e268c6Sopenharmony_ci/**
33c5e268c6Sopenharmony_ci * @file IIntellVoiceEngineAdapter.idl
34c5e268c6Sopenharmony_ci *
35c5e268c6Sopenharmony_ci * @brief Declares the APIs provided by the intelligent voice engine adapter for obtaining wakeup pcm and evaluating wakeup word.
36c5e268c6Sopenharmony_ci *
37c5e268c6Sopenharmony_ci * @since 5.0
38c5e268c6Sopenharmony_ci * @version 1.2
39c5e268c6Sopenharmony_ci */
40c5e268c6Sopenharmony_ci
41c5e268c6Sopenharmony_cipackage ohos.hdi.intelligent_voice.engine.v1_2;
42c5e268c6Sopenharmony_ci
43c5e268c6Sopenharmony_ciimport ohos.hdi.intelligent_voice.engine.v1_0.IIntellVoiceEngineAdapter;
44c5e268c6Sopenharmony_ciimport ohos.hdi.intelligent_voice.engine.v1_2.IntellVoiceEngineTypes;
45c5e268c6Sopenharmony_ci
46c5e268c6Sopenharmony_ci/**
47c5e268c6Sopenharmony_ci * @brief Defines the functions in intelligent voice engine adapter.
48c5e268c6Sopenharmony_ci *
49c5e268c6Sopenharmony_ci * The operations include obtaining wakeup pcm and evaluating wakeup word.
50c5e268c6Sopenharmony_ci *
51c5e268c6Sopenharmony_ci * @since 4.0
52c5e268c6Sopenharmony_ci * @version 1.2
53c5e268c6Sopenharmony_ci */
54c5e268c6Sopenharmony_ciinterface IIntellVoiceEngineAdapter extends ohos.hdi.intelligent_voice.engine.v1_0.IIntellVoiceEngineAdapter {
55c5e268c6Sopenharmony_ci    /**
56c5e268c6Sopenharmony_ci     * @brief obtains wakeup pcm.
57c5e268c6Sopenharmony_ci     * @param data Indicates wakeup pcm.
58c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
59c5e268c6Sopenharmony_ci     *
60c5e268c6Sopenharmony_ci     * @since 5.0
61c5e268c6Sopenharmony_ci     * @version 1.2
62c5e268c6Sopenharmony_ci     */
63c5e268c6Sopenharmony_ci    GetWakeupPcm([out] List <unsigned char> data);
64c5e268c6Sopenharmony_ci
65c5e268c6Sopenharmony_ci    /**
66c5e268c6Sopenharmony_ci     * @brief Evaluates wakeup word.
67c5e268c6Sopenharmony_ci     * @param word Indicates wakeup word.
68c5e268c6Sopenharmony_ci     * @param info Indicates evaluation result information.
69c5e268c6Sopenharmony_ci     * The information includes score, result code, see {@link EvaluationResultInfo}.
70c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
71c5e268c6Sopenharmony_ci     *
72c5e268c6Sopenharmony_ci     * @since 5.0
73c5e268c6Sopenharmony_ci     * @version 1.2
74c5e268c6Sopenharmony_ci     */
75c5e268c6Sopenharmony_ci    Evaluate([in] String word, [out] EvaluationResultInfo info);
76c5e268c6Sopenharmony_ci}