sapi

How to properly dispose of SpeechSynthesizer for async text-to-speech?

我只是一个虾纸丫 提交于 2019-12-11 07:31:43
问题 I have a form and I want to allow the user to receive asynchronous text-to-speech output based on the content of a text box whenever a button is pressed. For context, this form is launched as part of an "internal" C# function within VoiceAttack, and this is a continuation of a previous question. This snippet does the job nicely: SpeechSynthesizer synth = new SpeechSynthesizer(); // Create new SpeechSynthesizer instance // Function for asynchronous voicing of text with text-to-speech public

MS SAPI sdk equivalent on OSX

偶尔善良 提交于 2019-12-11 04:25:18
问题 I'm looking for an SDK that would allow me to have speech recognition on a OSX application. I already have a working code for windows using sapi, to get speech recognition info from an audio file, and i would like to see how to do this in osx since something like SAPI is not available. Thanks! 回答1: The OS X equivalent is the Speech Recognition service: http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/speech/Articles/RecognizeSpeech.html#//apple_ref/doc/uid/20002081

Playing voice over modem from a Windows service

大憨熊 提交于 2019-12-11 02:10:56
问题 I'm developing a VB.NET Windows service which is costantly checking a BMS database for new alarms and making phone calls to warn operators remotely. I'm currently using a .NET TAPI wrapper and the SAPI 5.3 interop assembly, and the steps I'm taking to speak over the phone are: Initialize TAPI interface; Make the call to the operator's number; Take the voice modem waveOut device id Set the voice output to that device id; Let SAPI do the magic. This is all working fine if I compile the code as

Memory leak in .Net Speech.Synthesizer?

荒凉一梦 提交于 2019-12-10 03:17:16
问题 I found a continuous leakage in my application. After examining using a memory profiler, I found the course is some object from Microsoft Speech.Synthesizer So I build up a toy project to verify the hypothesis: //Toy example to show memory leak in Speech.Synthesizer object static void Main(string[] args) { string text = "hello world. This is a long sentence"; PromptBuilder pb = new PromptBuilder(); pb.StartStyle(new PromptStyle(PromptRate.ExtraFast)); pb.AppendText(text); pb.EndStyle();

PHP基础之输出缓冲区基本概念、原理分析

心已入冬 提交于 2019-12-10 00:39:11
一、概念 在PHP运行的过程中,可以将会产生输出的函数或操作结果暂时保存在PHP的缓冲区,只有当缓冲区满了、或者PHP运行完毕、或者在必要时候进行输出,才会将数据输出到浏览器,此缓冲数据的区域称为PHP的输出缓冲区(OB)。 二、原理 ①使用了缓冲区之后,当执行PHP的时候,如果碰到了echo、print_r之类的会输出数据的代码(实际上许多函数都会产生输出),PHP就会将要输出的数据放到PHP自身的缓冲区,等待输出; ②当PHP自身的缓冲区接到指令,指示要输出缓冲区的内容时,将会把缓冲区内的数据输出到服务器上, 服务器接受到PHP输出的数据,然后再把该数据存在到服务器自身的缓冲区内,等到输出; ③当服务器接受到指令,只是要输出缓冲区的内容时, 将会把缓冲区的内容输出,返回到浏览器。 上面可以看出,输出缓冲区层不是唯一用于缓冲输出的层,它实际上只是很多层中的一个。最后一点你要记住输出缓冲区层的行为跟你使用的SAPI(web或cli)相关,不同的SAPI可能有不同的行为。 第一点概念有提到,缓冲区满了会将缓冲数据输出,这个跟SAPI有关,缓冲区主要是通过php.ini中的output_buffering变量控制。output_buffering的默认是on,默认值是4096(4kb)。 三、输出缓冲区的配置 1、以我们通常使用的PHP-FPM这种SAPI为例

How to register .dlm and .ngr files generated in Dictation Resource Kit in Windows 7?

三世轮回 提交于 2019-12-08 12:26:47
问题 I am using Windows Dictation Resource kit and I have geneated .dlm and .ngr files of a medical model and now how do I register these dictation topics in Windows 7, I also would like to know if is there a way to directly load them in the program? 回答1: You need to register the topics under the engine GUID key. For US English, the key is HKLM\SOFTWARE\Microsoft\Speech\Recognizers\Tokens\MS-1033-80-DESK\Models\1033\L1033\LMs\AddOn Create a REG_SZ key whose name is the dictation topic name, and

Microsoft speech API 5.1, 5.3?

你离开我真会死。 提交于 2019-12-08 05:04:37
问题 I'm a little confuse between the different SAPI version available. First of all, I only find the SDK to develop with the 5.1 version, is there any SDK for the 5.3 version available, if not, why ? Witch version can I use if I'm developing with the 3.5 version of the .Net framework. Is there any good tutorial because the only one I found are pretty old (they use 2003 version of visual studio) : http://msdn.microsoft.com/en-us/library/ms986944.aspx Is there any way I can use the speech API

How to get alternate single words during dictation in SAPI 5.4 using C#?

浪子不回头ぞ 提交于 2019-12-08 04:59:01
问题 I am running a user study with speech recognition and new technologies. During the laboratory tests, I need to display all the dictated text using an interface that I programmed. Currently, I can get the alternate whole sentences in C# but I need to get the single words. For example, if someone says "Hello, my name is Andrew", I want to get an alternate word for "Hello", "my", "name", "is" and "Andrew", instead of an alternate for the complete sentence. Here is a code snippet of the handler I

SAPI Speech recognition delphi

大城市里の小女人 提交于 2019-12-08 04:13:11
问题 I to need create a programmatic equivalent using delphi language... or could someone post a link on how to do grammars in peech recogniton using the delphi. Or any examples of XML grammar that has programmatic equivalent in Delphi. sorry for my english. **Programmatic Equivalent ** Ref: http://msdn.microsoft.com/en-us/library/ms723634(v=VS.85).aspx SPSTATEHANDLE hsHelloWorld; hr = cpRecoGrammar->GetRule(L"HelloWorld", NULL, SPRAF_TopLevel | SPRAF_Active, TRUE, &hsHelloWorld); hr =

Free-form text with custom SRGS based Grammar

自古美人都是妖i 提交于 2019-12-07 15:48:39
问题 I am trying to develop a Voice based application that would accept user input as speech and perform some actions based on the input. This is my first ever venture into this technology and I am learning while developing it. I am using Microsoft SAPI shipped with dotnet 4 to recognize speech. So far, I have learned about the two types of modes it supports. Speech recognition (SR) has two modes of operation: Dictation mode — an unconstrained, free-form speech interpretation mode that uses a