/*******************************************************************************
Copyright © 2015-2022 PICO Technology Co., Ltd.All rights reserved.
NOTICE:All information contained herein is, and remains the property of
PICO Technology Co., Ltd. The intellectual and technical concepts
contained herein are proprietary to PICO Technology Co., Ltd. and may be
covered by patents, patents in process, and are protected by trade secret or
copyright law. Dissemination of this information or reproduction of this
material is strictly forbidden unless prior written permission is obtained from
PICO Technology Co., Ltd.
*******************************************************************************/
using System;
namespace Pico.Platform.Models
{
///
/// The automatic speech recognition result.
///
public class AsrResult
{
///
/// The text recognized.
///
public readonly string Text;
///
/// Whether this is the final result:
/// * `true`: yes
/// * `false`: no
///
public readonly bool IsFinalResult;
public AsrResult(IntPtr o)
{
Text = CLIB.ppf_AsrResult_GetText(o);
IsFinalResult = CLIB.ppf_AsrResult_GetIsFinalResult(o);
}
}
///
/// Information about the automatic speech recognition error.
///
public class SpeechError
{
///
/// Error message.
///
public readonly string Message;
///
/// The ID of the session where the error occurred.
///
public readonly string SessionId;
///
/// Error code.
///
public readonly int Code;
public SpeechError(IntPtr o)
{
Message = CLIB.ppf_SpeechError_GetMessage(o);
Code = CLIB.ppf_SpeechError_GetCode(o);
SessionId = CLIB.ppf_SpeechError_GetSessionId(o);
}
}
}