using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Speech;
using System.Speech.Recognition;
using System.Speech.Synthesis;
using System.Speech.AudioFormat;
using System.Speech.Recognition.SrgsGrammar;
namespace voice
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
//载入自定义xml文件
/*
SpeechRecognizer recognizer = new SpeechRecognizer();
SrgsDocument doc = new SrgsDocument("gaarmmar.xml");
recognizer.LoadGrammar(new Grammar(doc));
*/
//载入内存sgrs语法文件范例
/*
SpeechRecognizer recognizer = new SpeechRecognizer();
SrgsDocument doc = new SrgsDocument();
SrgsRule command = new SrgsRule("command",new SrgsOneOf("尹成是大哥", "尹成是二哥", "尹成是三哥"));
doc.Rules.Add(command);
doc.Root = command;
recognizer.LoadGrammar(new Grammar(doc));
*/
//复杂语法文件定义范例
SpeechRecognizer recognizer = new SpeechRecognizer();
SrgsDocument doc = new SrgsDocument();
SrgsRule command = new SrgsRule("command");
SrgsRule rank = new SrgsRule("rank");
SrgsItem of = new SrgsItem("of");
SrgsRule suit = new SrgsRule("suit");
SrgsItem card = new SrgsItem(new SrgsRuleRef(rank), of, new SrgsRuleRef(suit));
command.Add(card);
rank.Add(new SrgsOneOf("一", "二", "三", "四", "五", "六", "七", "八", "九"));
of.SetRepeat(0, 1);
suit.Add(new SrgsOneOf("山大", "山大王", "时代"));
doc.Rules.Add(command, rank, suit);
doc.Root = command;
recognizer.LoadGrammar(new Grammar(doc));
}
}
}
如需源码,请留下email
分享到:
相关推荐
C#使用微软的Speech.Recognition库实现语音识别转文字
语音识别 训练过程 在matlab里进行程序运行
Speech Recognition System 语音识别插件,不需要互联网连接; 语音识别质量高、速度快; 支持24种语言; 跨平台(Windows, iOS, Android, macOS, Linux); 易于整合。支持语言: 英语、印度英语、中国、俄罗斯、法国、...
python speech_recognition库的中文语音识别包
基于BP神经网络的语音情感识别系统 神经网络是近年来信息科学、脑科学、神经心理学等诸多学科共同关注和研究的热点。由于其具有良好的抽象分类特性,现已应用于语音识别系统的研究和开发,并成为解决识别相关问题的...
中文语音识别1.环境巨蟒:3.5 Tensorflow:1.5.02.训练数据下载清华大学中文语料库(thchs30)3.训练配置conf目录下的conf.ini文件中的设定在python train.py运行python train.py开始训练在终端运行python test.py...
FUNDAMENTALS OF SPEECH RECOGNITION(语音识别基本原理)》(英文)
SpeechRecognition_DFCNN 语音识别
SpeechRecognition PocketSphinx语音识别中文包下载后直接解压到...\site-packages\speech_recognition\pocketsphinx-data
1:基于BP网络的语言识别 2:基于带动量项的BP神经网络语音识别 (内附详细注释)
Aspose.Recognition.dll 版本1.1.0.0 大小:2.59MB 破解 Aspose.Slides.dll 版本2.7.8.0 大小: 2.27MB 破解 Aspose.Tasks.dll 版本1.6.3.0 大小:765 KB 破解 Aspose.Words.dll 版本10.5.0.0 大小:6.29 MB 破解
离线中文语音识别,识别率较高,请大家珍惜作者的劳动成果谢谢!也是为了赚积分不然不会上传.
DTW算法语音识别C程序,希望对需要的人有帮助吧
Aspose.Recognition.dll 版本1.1.0.0 大小:2.59MB 破解 Aspose.Slides.dll 版本17.7 大小: 20.2MB 破解 Aspose.Tasks.dll 版本1.6.3.0 大小:765 KB 破解 Aspose.Words.dll 版本18.11 大小:10.9 MB 破解 Aspose....
基于MATLAB的说话人语音识别系统,mfcc,train,test,数据,以及主程序
基于python的中文语音识别系统. 包含声学模型和语言模型两个部分组成,两个模型都是基于神经网络。 声学模型 - acoustic_model文件夹下 该项目实现了GRU-CTC中文语音识别声音模型,所有代码都在gru_ctc_am.py中,...
语音识别的例程,适合初学者,使用VC环境,编译通过
这是一个简单(尽可能)的教程,展示了如何在 C# 中完成语音识别。 按下表格上的按钮,并在 5 秒内说出您的演讲。 在此示例中,Q 和 B 充当命令。 代码过滤识别的单词以查找字母 Q 和 B。文件包含源代码 - 使用它在...
python语音识别所需的PyAudio-0.2.11-cp37-cp37m-win_amd64.whl和SpeechRecognition-3.8.1-py2.py3-none-any.whl打包
React语音识别一个React钩子,可将语音从麦克风转换为文本,并将其提供给您的React组件。这个怎么运作useSpeechRecognition是一个React挂钩,它使组件可以访问从用户的麦克风拾取的语音记录。 SpeechRecognition管理...