SpeechRecognitionEngine.RecognizerInfo 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取有关 SpeechRecognitionEngine 的当前实例的信息。
public:
property System::Speech::Recognition::RecognizerInfo ^ RecognizerInfo { System::Speech::Recognition::RecognizerInfo ^ get(); };
public System.Speech.Recognition.RecognizerInfo RecognizerInfo { get; }
member this.RecognizerInfo : System.Speech.Recognition.RecognizerInfo
Public ReadOnly Property RecognizerInfo As RecognizerInfo
属性值
有关当前语音识别器的相关信息。
示例
以下示例获取当前进程内语音识别引擎的部分数据列表。 有关详细信息,请参阅 RecognizerInfo。
using System;
using System.Speech.Recognition;
namespace RecognitionEngine
{
class Program
{
static void Main(string[] args)
{
using (SpeechRecognitionEngine recognizer = new SpeechRecognitionEngine())
{
Console.WriteLine("Information for the current speech recognition engine:");
Console.WriteLine(" Name: {0}", recognizer.RecognizerInfo.Name);
Console.WriteLine(" Culture: {0}", recognizer.RecognizerInfo.Culture.ToString());
Console.WriteLine(" Description: {0}", recognizer.RecognizerInfo.Description);
}
Console.WriteLine();
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
}
}
注解
若要获取有关当前系统的所有已安装语音识别器的信息,请使用 InstalledRecognizers 方法。