/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @addtogroup HdiIntelligentVoiceEngine
 * @{
 *
 * @brief Provides unified APIs for intelligent voice framework services to access intelligent voice engine drivers.
 *
 * 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
 * access different types of intelligent voice engine devices based on the intelligent voice engine IDs, thereby obtaining or sending intelligent voice engine information,
 * creating or releasing an intelligent voice engine adapter, attaching or detaching the intelligent voice engine,
 * starting or stopping the intelligent voice engine, setting parameter to or getting parameter from the intelligent voice engine, 
 * writing audio or reading files from the intelligent voice engine, subscribing callback to the intelligent voice engine.
 *
 * @since 4.0
 * @version 1.2
 */

/**
 * @file IIntellVoiceEngineAdapter.idl
 *
 * @brief Declares the APIs provided by the intelligent voice engine adapter for obtaining wakeup pcm and evaluating wakeup word.
 *
 * @since 5.0
 * @version 1.2
 */

package ohos.hdi.intelligent_voice.engine.v1_2;

import ohos.hdi.intelligent_voice.engine.v1_0.IIntellVoiceEngineAdapter;
import ohos.hdi.intelligent_voice.engine.v1_2.IntellVoiceEngineTypes;

/**
 * @brief Defines the functions in intelligent voice engine adapter.
 *
 * The operations include obtaining wakeup pcm and evaluating wakeup word.
 *
 * @since 4.0
 * @version 1.2
 */
interface IIntellVoiceEngineAdapter extends ohos.hdi.intelligent_voice.engine.v1_0.IIntellVoiceEngineAdapter {
    /**
     * @brief obtains wakeup pcm.
     * @param data Indicates wakeup pcm.
     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
     *
     * @since 5.0
     * @version 1.2
     */
    GetWakeupPcm([out] List <unsigned char> data);

    /**
     * @brief Evaluates wakeup word.
     * @param word Indicates wakeup word.
     * @param info Indicates evaluation result information.
     * The information includes score, result code, see {@link EvaluationResultInfo}.
     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
     *
     * @since 5.0
     * @version 1.2
     */
    Evaluate([in] String word, [out] EvaluationResultInfo info);
}