sapi

How to add custom SR (Speech Recognition) to Microsoft SAPI

社会主义新天地 提交于 2019-12-04 02:19:42
问题 I have a Speech Recognition application for a Language X. This language is not supported by Microsoft SAPI. How can I add this SR for Language X to Microsoft SAPI so that I can use it via Microsoft SAPI ? So What I wonder is Can I add a custom SR to Microsoft SAPI? If so How? If It is a complex process, where to find details? 回答1: SAPI is just the application programming interface, it only provides the connector for the speech recognition engine. There could be multiple implementations of the

深入理解php底层:php生命周期

我的梦境 提交于 2019-12-03 18:19:59
1、PHP的运行模式: PHP两种运行模式是WEB模式、CLI模式。无论哪种模式,PHP工作原理都是一样的,作为一种SAPI运行。 1、当我们在终端敲入php这个命令的时候,它使用的是CLI。 它就像一个web服务器一样来支持php完成这个请求,请求完成后再重新把控制权交给终端。 2、当使用Apache或者别web服务器作为宿主时,当一个请求到来时,PHP会来支持完成这个请求。一般有: 多进程(通常编译为apache的模块来处理PHP请求) 多线程模式 2、一切的开始: SAPI接口 通常我们编写php Web程序都是通过Apache或者Nginx这类Web服务器来测试脚本. 或者在命令行下通过php程序来执行PHP脚本. 执行完成脚本后,服务器应答,浏览器显示应答信息,或者在命令结束后在标准输出显示内容. 我们很少关心PHP解释器在哪里. 虽然通过Web服务器和命令行程序执行脚本看起来很不一样. 实际上她们的工作是一样的. 命令行程序和Web程序类似, 命令行参数传递给要执行的脚本,相当于通过url 请求一个PHP页面. 脚本戳里完成后返回响应结果,只不过命令行响应的结果是显示在终端上. 脚本执行的开始都是通过SAPI接口进行的. 1)、启动apache :当给定的SAPI启动时,例如在对/usr/local/apache/bin/apachectl start的响应中

SAPI 5 voice synthesis and C#

∥☆過路亽.° 提交于 2019-12-03 17:23:34
I have installed new SAPI5 voice. In computer settings of Speech program is new voice visible and available to use. But my program cannot find it. To find it, I am using this part of code, I use System.Speech.Synthesis namespace. SpeechSynthesizer s = new SpeechSynthesizer(); foreach (InstalledVoice v in s.GetInstalledVoices()) { st += v.VoiceInfo.Name+"\n"; } MessageBox.Show(st); The only voice found is Microsoft Anna. My code for speeking is as follow: s.SelectVoice("Eliska22k");//name of the voice is Eliska22k s.Speak("ahoj"); I am using C# 4 and I have windows vista 32 bit. Where is my

Microsoft Speech Recognition Speed

此生再无相见时 提交于 2019-12-03 14:40:12
I am working on a small practice app using Microsoft's speech recognizer. I cannot seem to get it to recognize single words fast enough for what I am doing. I would like to be able to speak normally and the system will grab "keywords" from what I am saying and produce a string. Currently I am using a custom grammar of 5 words. Red, Blue, Yellow, Green, Orange. For example if I say Red blue yellow. The engine will grab "Red" and the rest goes into the void. I have tried using the following: sr.RecognizeAsync(RecognizeMode.Single) Then reset it back to single mode after the AudioState changes to

Synchronization Problem for SAPI or (text to speech ) … C#

旧城冷巷雨未停 提交于 2019-12-02 11:32:45
I'm working on a project which will speak the content of browsed web page.Browser is made by me using WebControl. I'm using SAPI for speech engine. I wanted to highlight the line in web page while reading that trough SpVoice.speak. But the problem is that if I use this speak method in Asynchronous way,then only last line of the web page getting highlighted,because the loop doesn't wait for the voice to complete. Thus it happens so fast that only last line is shown as highlighted.Highlight method is using a reference Microsoft mshtml. CODE: SpeechLib.SpVoice sound_object = new SpeechLib.SpVoice

How to use the function GetStorageFileName for adding training files to registry?

对着背影说爱祢 提交于 2019-12-02 02:37:21
I am using sapi 5.4 and I am able to retain the audio for training but for adding it to registry entries as given in this Acoustic training using SAPI 5.3 Speech API I am not able to understand the arguments to be used for ISpObjectToken::GetStorageFileName can somebody help me out with it? ISpObjectToken::GetStorageFileName isn't the best documented API in the world. Luckily, I have some worked examples to help improve the documentation. clsidCaller Set this if you need the file name associated with the object token. For training, this should be CLSID_NULL . (If you're updating engine-related

Combine free-form dictation and semantic in a srgs grammar

只谈情不闲聊 提交于 2019-12-01 14:11:54
I'm trying to combine both the result of a semantic and a dictation request in the semantic value of a SRGS document. For example, I would say "Search potato" and the output would be something like out="Search Potato" where Potato is a random word spoken by the user. I tought about using the garbage special rule, but it doesn't seem to work. So far that's what I have : <rule id="rule1" scope="public"> <one-of> <item xml:lang="en-us">Search</item> <item>Cherche</item> </one-of> <tag>out.command="Search"</tag> <tag>out.param1=<ruleref special="GARBAGE"/></tag> <tag>out=out.command+out.param1;<

How to add custom SR (Speech Recognition) to Microsoft SAPI

喜夏-厌秋 提交于 2019-12-01 13:41:07
I have a Speech Recognition application for a Language X. This language is not supported by Microsoft SAPI. How can I add this SR for Language X to Microsoft SAPI so that I can use it via Microsoft SAPI ? So What I wonder is Can I add a custom SR to Microsoft SAPI? If so How? If It is a complex process, where to find details? SAPI is just the application programming interface, it only provides the connector for the speech recognition engine. There could be multiple implementations of the same interface. If default implementation by Microsoft doesn't include language X you have multiple choices

TTS for Chinese is throwing SAPI ERROR E_FAIL

若如初见. 提交于 2019-12-01 10:58:23
This is my code for Chinese TTS which is failing in the speak function although Chinese TTS engine is installed successfully using Microsoft.Speech.Synthesis; using System.Globalization; namespace TTS3 { class Program { static void Main(string[] args) { //CultureInfo=new CultureInfo("zh-CN"); SpeechSynthesizer synth = new SpeechSynthesizer(); // Output information about all of the installed voices. foreach (InstalledVoice voice in synth.GetInstalledVoices(new CultureInfo("zh-CN"))) { synth.SelectVoice(voice.VoiceInfo.Name); //Console.WriteLine(synth.Voice.Description); synth

Delphi and SAPI

[亡魂溺海] 提交于 2019-12-01 10:06:07
问题 What resource can I learn from to use SAPI from Delphi? How to use Speech Recognition from Delphi Applications? 回答1: Speech Synthesis & Speech Recognition: Using SAPI 5.1 from the makers of Delphi sounds like a good begin. 来源: https://stackoverflow.com/questions/1021490/delphi-and-sapi