⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vxiprompt.h

📁 OSB-PIK-OpenVXI-3.0.0源代码 “中国XML论坛 - 专业的XML技术讨论区--XML在语音技术中的应用”
💻 H
📖 第 1 页 / 共 2 页
字号:
 /****************License************************************************  *  * Copyright 2000-2003.  ScanSoft, Inc.      *  * Use of this software is subject to notices and obligations set forth   * in the SpeechWorks Public License - Software Version 1.2 which is   * included with this software.   *  * ScanSoft is a registered trademark of ScanSoft, Inc., and OpenSpeech,   * SpeechWorks and the SpeechWorks logo are registered trademarks or   * trademarks of SpeechWorks International, Inc. in the United States   * and other countries.  *  ***********************************************************************/  #ifndef _VXIPROMPT_H #define _VXIPROMPT_H  #include "VXItypes.h"                  /* For VXIchar definition */ #include "VXIvalue.h"                  /* For VXIMap */  #include "VXIheaderPrefix.h" #ifdef VXIPROMPT_EXPORTS #define VXIPROMPT_API SYMBOL_EXPORT_DECL #else #define VXIPROMPT_API SYMBOL_IMPORT_DECL #endif  #ifdef __cplusplus extern "C" { #endif  /**  * @name VXIprompt  * @memo Prompt Interface  * @version 1.0  * @doc  * Abstract interface for Prompting functionality.  Prompts are represented  * as a series of SSML documents.<p>  *  * The Prompt interface the handles prefetching, caching, and  * streaming audio as required to provide good response times and low  * CPU and network overhead. <p>  *  * There is one prompt interface per thread/line.  */  /*@{*/ /**  * VoiceXML allows audio collected during the <record> element to be played  * in the middle of SSML documents.  These recordings are passed by the  * VXI to the VXIprompt implementation inside the properties VXIMap.  * The PROMPT_AUDIO_REFS points to a second VXIMap containing pairs of  * identifiers (VXIStrings) and their associated recording (VXIContent).  * Each identifier is proceeded by PROMPT_AUDIO_REFS_SCHEME.  *  * Withing the SSML document, the audio recording is replaced by a mark  * element whose name attribute is an identifier inside the PROMPT_AUDIO_REFS  * map.  */ #define PROMPT_AUDIO_REFS            L"vxi.prompt.audioReferences" /* VXIMap */ #define PROMPT_AUDIO_REFS_SCHEME     L"x-vxiprompt-ref" #define PROMPT_AUDIO_REFS_SCHEME_LENGTH 16  #define PROMPT_PREFETCH_REQUEST      L"vxi.prompt.prefetchLevel" /* VXIInteger, 0 if no prefetch is requested, 1 is prefetch is desired */  /**  * Result codes for interface methods  *  * Result codes less then zero are severe errors (likely to be  * platform faults), those greater then zero are warnings (likely to  * be application issues)  */ typedef enum VXIpromptResult {   /* Fatal error, terminate call     */   VXIprompt_RESULT_FATAL_ERROR       =  -100,   /* I/O error                       */   VXIprompt_RESULT_IO_ERROR           =   -8,   /* Out of memory                   */   VXIprompt_RESULT_OUT_OF_MEMORY      =   -7,   /* System error, out of service    */   VXIprompt_RESULT_SYSTEM_ERROR       =   -6,   /* Errors from platform services   */   VXIprompt_RESULT_PLATFORM_ERROR     =   -5,   /* Return buffer too small         */   VXIprompt_RESULT_BUFFER_TOO_SMALL   =   -4,   /* Property name is not valid      */   VXIprompt_RESULT_INVALID_PROP_NAME  =   -3,   /* Property value is not valid     */   VXIprompt_RESULT_INVALID_PROP_VALUE =   -2,   /* Invalid function argument       */   VXIprompt_RESULT_INVALID_ARGUMENT   =   -1,   /* Success                         */   VXIprompt_RESULT_SUCCESS            =    0,   /* Normal failure, nothing logged  */   VXIprompt_RESULT_FAILURE            =    1,   /* Non-fatal non-specific error    */   VXIprompt_RESULT_NON_FATAL_ERROR    =    2,   /* URI fetch timeout               */   VXIprompt_RESULT_FETCH_TIMEOUT      =   50,   /* URI fetch error                 */   VXIprompt_RESULT_FETCH_ERROR        =   51,   /* Bad sayas class                 */   VXIprompt_RESULT_BAD_SAYAS_CLASS    =   52,   /* TTS access failure              */   VXIprompt_RESULT_TTS_ACCESS_ERROR   =   53,   /* TTS unsupported language        */   VXIprompt_RESULT_TTS_BAD_LANGUAGE   =   54,   /* TTS unsupported document type   */   VXIprompt_RESULT_TTS_BAD_DOCUMENT   =   55,   /* TTS document syntax error       */   VXIprompt_RESULT_TTS_SYNTAX_ERROR   =   56,   /* TTS generic error               */   VXIprompt_RESULT_TTS_ERROR          =   57,   /* Resource busy, such as TTS      */   VXIprompt_RESULT_RESOURCE_BUSY      =   58,   /* HW player unsupported MIME type */   VXIprompt_RESULT_HW_BAD_TYPE        =   59,   /* Generic HW player error         */   VXIprompt_RESULT_HW_ERROR           =   60,   /* resource is not avaialable      */   VXIprompt_RESULT_NO_RESOURCE        =   61,   /* resource is not authorized      */   VXIprompt_RESULT_NO_AUTHORIZATION   =   62,   /* Operation is not supported      */   VXIprompt_RESULT_UNSUPPORTED        =  100 } VXIpromptResult;   /* ** ================================================== ** VXIpromptInterface Interface definition ** ================================================== */ /** @name VXIpromptInterface  ** @memo VXIprompt interface for prompting  **  */ typedef struct VXIpromptInterface {   /**    * @name GetVersion    * @memo Get the VXI interface version implemented    *    * @return  VXIint32 for the version number. The high high word is    *          the major version number, the low word is the minor version    *          number, using the native CPU/OS byte order. The current    *          version is VXI_CURRENT_VERSION as defined in VXItypes.h.    */   VXIint32 (*GetVersion)(void);    /**    * @name GetImplementationName    * @memo Get the name of the implementation    *    * @return  Implementation defined string that must be different from    *          all other implementations. The recommended name is one    *          where the interface name is prefixed by the implementator's    *          Internet address in reverse order, such as com.xyz.rec for    *          VXIrec from xyz.com. This is similar to how VoiceXML 1.0    *          recommends defining application specific error types.    */   const VXIchar* (*GetImplementationName)(void);    /**    * @name BeginSession    * @memo Reset for a new session.    *    * @doc    * This must be called for each new session, allowing for    * call specific handling to occur. For some implementations, this    * can be a no-op.  For others runtime binding of resources or other    * call start specific handling may be done on this call.    *    * @param args  [IN] Implementation defined input and output    *                    arguments for the new session    *    * @return VXIprompt_RESULT_SUCCESS on success    */   VXIpromptResult (*BeginSession)(struct VXIpromptInterface  *pThis,                                   VXIMap                     *args);    /**    * @name EndSession    * @memo Performs cleanup at the end of a call session.    *    * @doc    * This must be called at the termination of a call, allowing for

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -