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