sapi

Streaming input to System.Speech.Recognition.SpeechRecognitionEngine

ぃ、小莉子 提交于 2019-11-27 04:34:13
I am trying to do "streaming" speech recognition in C# from a TCP socket. The problem I am having is that SpeechRecognitionEngine.SetInputToAudioStream() seems to require a Stream of a defined length which can seek. Right now the only way I can think to make this work is to repeatedly run the recognizer on a MemoryStream as more input comes in. Here's some code to illustrate: SpeechRecognitionEngine appRecognizer = new SpeechRecognitionEngine(); System.Speech.AudioFormat.SpeechAudioFormatInfo formatInfo = new System.Speech.AudioFormat.SpeechAudioFormatInfo(8000, System.Speech.AudioFormat

What is SAPI and when would you use it?

丶灬走出姿态 提交于 2019-11-27 00:13:06
问题 I've been learning about error handling in PHP recently and came across the error_log() function. In the PHP manual, it talks about all the error log types and I understand all of them except for type 3 which states that the error message is sent directly to the SAPI logging handler. My question is what exactly is SAPI and when would you want to use it? 回答1: SAPI stands for "Server API" (and API stands for "Application Programming Interface"). It is the mechanism that controls the interaction

Python 3.4 - Text to Speech with SAPI

时光怂恿深爱的人放手 提交于 2019-11-26 18:36:53
问题 I was trying to use this code to convert text to speech with Python 3.4, but since my computer's main language is not English (I'm using Win7x64) the voice and the accent are wrong (Because I want it to "speak" English). import win32com.client speaker = win32com.client.Dispatch("SAPI.SpVoice") speaker.Speak("Hello, it works!") so, is there a way to change the voice/language (of the program, not the system)? Also, do you think there is a better way to do this? Perhaps a module that can work on

SAPI and Windows 7 Problem

寵の児 提交于 2019-11-26 16:44:18
I'm trying to recognize speech with Windows 7 but it always recognizes a speech as a command or just says "What was that?". How I can get all speeches? CODE: SpeechRecognizer _speechRecognizer; public Window1() { InitializeComponent(); // set up the recognizer _speechRecognizer = new SpeechRecognizer(); _speechRecognizer.Enabled = false; _speechRecognizer.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(_speechRecognizer_SpeechRecognized); } Perhaps you want to use the .net System.Speech namespace instead of SAPI? There is a very good article that was published a few years ago

Acoustic training using SAPI 5.3 Speech API

[亡魂溺海] 提交于 2019-11-26 16:18:24
问题 Using Microsoft's SAPI 5.3 Speech API on Vista, how do you programatically do acoustic model training of a RecoProfile? More concretely, if you have a text file, and an audio file of a user speaking that text, what sequence of SAPI calls would you make to train the user's profile using that text and audio? Update: More information about this problem I still haven't solved: You call ISpRecognizer2.SetTrainingState( TRUE, TRUE ) at "the beginning" and ISpRecognizer2.SetTrainingState( FALSE,

Help with SAPI v5.1 SpeechRecognitionEngine always gives same wrong result with C#

假如想象 提交于 2019-11-26 14:48:40
问题 I was playing around with this SAPI v5.1 library. So I was testing a sample WAV file I have. (Download it from here). Anyway, the sound in that file is clear and easy. It contains only one word which is number three. Now when I run the following code, I get number 8 or "eight". If I remove it, I get 7. If I try to randomize the list I get different results and so on. I'm really getting confused and started to think that SpeachRecognition in SAPI library doesn't work at all... Anyway here is

SAPI and Windows 7 Problem

僤鯓⒐⒋嵵緔 提交于 2019-11-26 04:55:45
问题 I\'m trying to recognize speech with Windows 7 but it always recognizes a speech as a command or just says \"What was that?\". How I can get all speeches? CODE: SpeechRecognizer _speechRecognizer; public Window1() { InitializeComponent(); // set up the recognizer _speechRecognizer = new SpeechRecognizer(); _speechRecognizer.Enabled = false; _speechRecognizer.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(_speechRecognizer_SpeechRecognized); } 回答1: Perhaps you want to use the