什么是在asp.net web应用程序转录语音到文本的最佳选择? [英] What is the best option for transcribing speech-to-text in a asp.net web app?

查看:209
本文介绍了什么是在asp.net web应用程序转录语音到文本的最佳选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立一个web应用程序的录制语音消息,我期待为转换语音消息文本的最佳选择。有没有人有什么一些建议用来进行转换?将System.Speech工作?

I am building a web app for recording voice messages and am looking for the best options for converting the voice messages to text. Does anyone have some suggestions on what to use to make the conversion? Would System.Speech work?

推荐答案

System.Speech是客户为中心的API。 Vista和Windows 7都包含用于System.Speech的语音引擎。您可以使用此转录,因为微软提供的客户端的语音引擎包括听写语法。

System.Speech is a client focused API. Vista and Windows 7 include the speech engines for System.Speech. You could use this for transcription because the client speech engines provided by Microsoft include a dictation grammar.

由微软提供的服务器的语音引擎不包括听写文法,所以它们用于转录更加困难。服务器识别的.NET命名空间是Microsoft.Speech和10.2版本,完整的SDK可在<一href=\"http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1b1604d3-4f66-4241-9a21-90a294a5c9a4\">http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1b1604d3-4f66-4241-9a21-90a294a5c9a4.语音引擎是一个免费下载。

The server speech engines provided by Microsoft do not include a dictation grammar, so they are more difficult to use for transcription. The .NET namespace for server recognition is Microsoft.Speech and the complete SDK for the 10.2 version is available at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1b1604d3-4f66-4241-9a21-90a294a5c9a4. The speech engine is a free download.

要开始使用.NET的演讲,有一个是在<一个几年前发表了一篇非常好的文章href=\"http://msdn.microsoft.com/en-us/magazine/cc163663.aspx\">http://msdn.microsoft.com/en-us/magazine/cc163663.aspx.这可能是最好的介绍性文章,到目前为止,我发现。这是一个有点过时,但很helfpul。 (该AppendResultKeyValue方法公测后丢弃。)

To get started with .NET speech, there is a very good article that was published a few years ago at http://msdn.microsoft.com/en-us/magazine/cc163663.aspx. It is probably the best introductory article I’ve found so far. It is a little out of date, but very helfpul. (The AppendResultKeyValue method was dropped after the beta.)

下面是一个快速的示例,演示了最简单的.NET的一个窗口窗体应用程序使用听写语法,我能想到的。这应该在Windows Vista或Windows 7的工作,我创建了一个表格。下降按钮就可以了,并取得了很大的按钮。加入System.Speech的引用,该行:

Here is a quick sample that shows one of the simplest .NET windows forms app to use a dictation grammar that I could think of. This should work on Windows Vista or Windows 7. I created a form. Dropped a button on it and made the button big. Added a reference to System.Speech and the line:

using System.Speech.Recognition;

然后,我添加了以下事件处理程序按钮1:

Then I added the following event handler to button1:

private void button1_Click(object sender, EventArgs e)
{         
    SpeechRecognitionEngine recognizer = new SpeechRecognitionEngine();
    Grammar dictationGrammar = new DictationGrammar();
    recognizer.LoadGrammar(dictationGrammar);
    try
    {
        button1.Text = "Speak Now";
        recognizer.SetInputToDefaultAudioDevice();
        RecognitionResult result = recognizer.Recognize();
        button1.Text = result.Text;
    }
    catch (InvalidOperationException exception)
    {
        button1.Text = String.Format("Could not recognize input from default aduio device. Is a microphone or sound card available?\r\n{0} - {1}.", exception.Source, exception.Message);
    }
    finally
    {
        recognizer.UnloadAllGrammars();
    }                          
}

一个小的详细信息进行比较语音引擎和微软的API出货的各种口味的<一个找到href=\"http://stackoverflow.com/questions/2977338/what-is-the-difference-between-system-speech-recognition-and-microsoft-speech-rec\">What是System.Speech.Recognition和Microsoft.Speech.Recognition区别?

A little more information comparing the various flavors of speech engines and APIs shipped by Microsoft can be found at What is the difference between System.Speech.Recognition and Microsoft.Speech.Recognition?

这篇关于什么是在asp.net web应用程序转录语音到文本的最佳选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆