我想知道怎么做
<input type="text" x-webkit-speech speech />
Run Code Online (Sandbox Code Playgroud)
是否有内置于Chrome中的语音识别功能,或者是否正在访问操作系统中的基础语音识别功能?
是否有针对桌面或浏览器环境的已知API的完整列表?
speech-recognition text-to-speech speech-synthesis speech-to-text
我试图用Windows 7识别语音,但它总是将语音识别为命令或只是说"那是什么?".
我怎么能得到所有的演讲?
码:
SpeechRecognizer _speechRecognizer;
public Window1()
{
InitializeComponent();
// set up the recognizer
_speechRecognizer = new SpeechRecognizer();
_speechRecognizer.Enabled = false;
_speechRecognizer.SpeechRecognized +=
new EventHandler<SpeechRecognizedEventArgs>(_speechRecognizer_SpeechRecognized); }
Run Code Online (Sandbox Code Playgroud) 我目前正在开发DialerService的项目。功能之一是将记录的.wav媒体文件解释为纯文本。我使用了SpeechRecognitionEngine尝试解释内容,但得到的结果有些不正确,有时甚至是断句没有任何意义。
.wav文件是来自两个或多个客户之间的电话交谈的记录的文件,我测试的文件是我与同事进行的非常简单而简短的交谈。
所以我的问题是,如何才能提高解释的准确性,以及如何为此目的改进代码?我知道添加语法将有助于识别一些关键字,但是我需要的是一般性地解释我从用户那里记录的内容。
这里的打击是我的工作代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading.Tasks;
using System.Speech.Recognition;
using System.Speech.AudioFormat;
using System.Web;
namespace VoiceRecognition
{
class Program
{
static bool completed;
static void Main(string[] args)
{
using (
SpeechRecognitionEngine recognizer =
new SpeechRecognitionEngine(
new System.Globalization.CultureInfo("en-US")))
{
// Create and load a grammar.
Grammar dictation = new DictationGrammar();
dictation.Name = "Dictation Grammar";
recognizer.LoadGrammar(new DictationGrammar());
recognizer.SetInputToWaveFile(@"C:\Projects2\VoiceRecognition2\conf_with_vincent_1.wav");
// Attach event handlers for the results of recognition.
//recognizer.AudioLevelUpdated += new EventHandler<AudioLevelUpdatedEventArgs>(recognizer_AudioLevelUpdated);
//recognizer.AudioStateChanged += new …Run Code Online (Sandbox Code Playgroud)