SrgsToken 类

定义

表示能识别的单词或短语。Represents a word or short phrase that can be recognized.

public ref class SrgsToken : System::Speech::Recognition::SrgsGrammar::SrgsElement
[System.Serializable]
public class SrgsToken : System.Speech.Recognition.SrgsGrammar.SrgsElement
[<System.Serializable>]
type SrgsToken = class
    inherit SrgsElement
Public Class SrgsToken
Inherits SrgsElement
继承
属性

注解

使用类的成员 SrgsToken ,可以指定三种形式的单词: Display 窗体、 Text 窗体和 word 的自定义 PronunciationUsing the members of the SrgsToken class, you can specify three forms of a word: the Display form, the Text form, and a custom Pronunciation for the word.

如果有多个字词存储在一个 SrgsToken 对象中,则每个单词在内部和结果中被视为不同的标记。If multiple words are stored in a single SrgsToken object, each is treated as a different token internally and in the result.

此类表示 token 万维网联合会 (W3C) 语音识别语法规范定义的元素 (SRGS) 版本 1.0.This class represents the token element defined by the World Wide Web Consortium (W3C) Speech Recognition Grammar Specification (SRGS) Version 1.0.. 有关 SRGS 元素的信息 token 以及有关其对系统的支持的详细信息,请参阅 标记元素For information about the SRGS token element and details about its support by System.Speech, see token Element.

构造函数

SrgsToken(String)

初始化 SrgsToken 类的新实例并指定要识别的文本。Initializes a new instance of the SrgsToken class and specifies the text to be recognized.

属性

Display

获取或设置需朗读的文本的显示形式。Gets or sets the display form of the text to be spoken.

Pronunciation

获取或设置定义标记发音的字符串。Gets or sets the string that defines the pronunciation for the token.

Text

获取或设置应朗读的单词的书写形式。Gets or sets the written form of the word that should be spoken.

方法

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(继承自 MarshalByRefObject)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于