windows 语音识别!

本文介绍了Windows桌面语音识别技术的基础,包括通过System.Speech.Recognition命名空间来扩展语音识别功能,利用GrammarBuilder和Choices类简化语法文档的创建,以及探讨了语音合成引擎和全球化信息处理。同时,文章还提到了事件处理委托和SpeechRecognizer的语音识别拒绝事件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  The Recognition namespace contains Windows Desktop Speech technology types for implementing speech recognition.

The Windows Desktop Speech Technology software offers a basic speech recognition infrastructure that digitizes acoustical signals, and recovers words and speech elements from audio input.

   Applications use System.Speech.Recognition namespace to access and extend this basic speech recognition technology, by defining algorithms for identifying and acting on specific phrases or word patterns, and by managing the run time behavior of this speech infrastructure.

 Applications manage and obtain use grammars -- sets of rules defining how specific combinations of words and phrases are to be understood --through the general purposeGrammar class, which hosts runtime, persisted, or dynamically constructed instances ofSrgsDocument.SrgsDocument instances contain W3C Speech Recognition Grammar Specification (SRGS) compliant grammar documents.

A simplified means of specifying grammar documents is provided through the GrammarBuilder and Choices classes. Full support for generating SRGS compliant grammars is provided by the members of theSystem.Speech.Recognition.SrgsGrammar name space. 

   这个Recognition命名空间含有windows desktop语音识别技术类型用于实现speech recognition。

    那个windows桌面语音技术软件提供了一个基本的语音识别的数字化听觉的信号设施,和回复字词和语音元素从 audio input。

     应用程序用System.Speech.Recognition命名空间去访问和扩展那个基本的语音识别技术,通过定义算法式

    程序控制和得到使用语法,和设置规则如何特定的单词语法制品被去理解,通过一般的

   我在讲一下,GrammarBuilder类

  The Speech platform offers the GrammarBuilder class as a simple mechanism for constructingGrammar objects programmatically. Unlike the construction of Grammar instances from objects created using the System.Speech.Recognition.SrgsGrammar namespace, creating Grammar objects through a GrammarBuilder does not require a detailed understanding of the Speech Recognition Grammar Specification (SRGS).

To construct a basic Grammar object from a GrammarBuilder the following steps are required:

1. Create an appropriate GrammarBuilder instance. For more information on creatingGrammar objects see GrammarBuilder, Add and Addition.

2. Append to the GrammarBuilder objects which support grammar logic such as external reference to external rules, the Speech platform provided dictation grammars,[System.String],Choices,SemanticResultKey,SemanticResultValue, and other GrammarBuilder instances. For more information, seeAppend.

3. Construct a Grammar object from the GrammarBuilder using a Grammar.Grammar(GrammarBuilder) .

To support debugging, the current status of a GrammarBuilder can be written to a string usingDebugShowPhrases.

    这个语音平台提供了这个GrammarBuilder 类作为一个简单的程序的机械为构造Grammar对象,不想 Grammar的构造实例从对象,创造 Grammar对象通过一个GrammarBuilde

 System.Speech.Synthesis

The System.Speech.Synthesis namespace contains classes for initializing and configuring a speech synthesis engine, for creating prompts, for generating speech, for responding to events, and for modifying voice characteristics

这个System.Speech.Synthesis 命名含有初始化和配置一个对话,为了创造提示,为了发生,为了回应

System.Globalization Namespace

The System.Globalization namespace contains classes that define culture-related information, including language, country/region, calendars in use, format patterns for dates, currency, and numbers, and sort order for strings. These classes are useful for writing globalized (internationalized) applications. Classes such asStringInfo andTextInfo provide advanced globalization functionalities, including surrogate support and text element processing

 这个命名空间含有定义文化相关的信息,包括语言,国家/地区。这些类对写大体的应用程序是有用的

EventHandler<TEventArgs> Delegate

The event model in the .NET Framework is based on having an event delegate that connects an event with its handler. To raise an event, two elements are needed:

  • A delegate that refers to a method that provides the response to the event.

  • A class that holds the event data.

这个事件在.net  framework 是基于有一个事件代理

The delegate is a type that defines a signature, that is, the return value type and parameter list types for a method. You can use the delegate type to declare a variable that can refer to any method with the same signature as the delegate.

The standard signature of an event handler delegate defines a method that does not return a value, whose first parameter is of typeObject and refers to the instance that raises the event, and whose second parameter is derived from typeEventArgs and holds the event data. If the event does not generate event data, the second parameter is simply an instance ofEventArgs. Otherwise, the second parameter is a custom type derived from EventArgs and supplies any fields or properties needed to hold the event data

那个代理是一个定义签名类型,那个返回类型和参数列表类型的方法。

SpeechRecognizer.SpeechRecognitionRejected Event

The shared recognizer raises this event if it determines that input does not match with sufficient confidence any of the loaded speech recognition grammars. TheResult property of theSpeechRecognitionRejectedEventArgs contains the rejected RecognitionResult object.

Confidence thresholds for the shared recognizer, managed by SpeechRecognizer, are associated with a user profile and stored in the Windows registry. Applications should not write changes to the registry for the properties of the shared recognizer.

When you create a delegate for a SpeechRecognitionRejected event, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates

 这个分享的recognizer升起的事件假如他决定输入不能搭配足够的信任任何下载的语音识别语法。那个

 相信共享的门槛,被SpeechRecognizer所管理,与联系一个用户的侧面和储藏在windows的注册。应用程序不应该写变化去注册

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值