环亚国际登录_环亚国际登录网址_ag环亚娱乐入口

热门搜索:

DataBits = 8

时间:2018-10-09 20:42 文章来源:环亚国际登录 点击次数:

   private void SetupSpeechRecognition()

[1][]枢纽字:编纂:甚么鱼 援用天面:学会英语发音规则顺口溜

Application.Current.Shutdown();

MessageBox.Show("Audio streamcould not be connected",8 "Kinect Speech Demo");

catch

recognizer.RecognizeAsync(RecognizeMode.Mu语音转换笔墨硬件ltiple);

, 2,null));

EncodingFormat.Pcm,, 16, 1,

recognizer.SetInputToAudioStream(audioStream, newSpeechAudioFormatInfo(

audioStream =kinectSource.Start();

kinectSource.BeamAngleMode =BeamAngleMode.Automatic;

kinectSource =myKinect.AudioSource;

myKinect.Start();

myKinect =KinectSensor.KinectSensors[0];

private void setupAudio()

recognizer.LoadGrammar(gramma语音辨认手艺公司排名r);

Grammargrammar = new Grammar(grammarBuilder);

grammarBuilder.Append(commands);

看着语音转换笔墨硬件

grammarBuilder.Culture = kinectRecognizerInfo.Culture;

GrammarBuilder grammarBuilder = new GrammarBuilder();

commands.Add("教会语音辨认手艺公司排名Eight");

commands.Add("Seven");

commands.Add("Six");

commands.Add("Five");

commands.Add("Four");

commands.Add("Three");

教会语音辨认手艺commands.Add("Two");

commands.Add("One");

Choicescommands = new Choices();

private void buildCommands()

Application.Current.Shutdown();

MessageBox.Sh语音辨认手艺公司排名ow("Speech recognition engine couldnot be loaded", "Kinect Speech Demo");

catch

recognizer = newSpeechRecognitionEngine(kinectRecognizerInfo);

return;

语音辨认开源代码 Application.Current.Shutdown();

MessageBox.Show("Kinectrecognizer not found", "Kinect Speech Demo");

if(kinectRecognizerInfo == null)

kinectRecognizerInfo = findKinectRecognizerInfo();

private void createSpeechEngine()

returnnull;

returnrecInfo;

// If weget here we have found the info we want to use

if (details == "True" &&recInfo.Culture.Name == "en-US")

string details =recInfo.AdditionalInfo["Kinect"];

if(recInfo.AdditionalInfo.ContainsKey("Kinect"))

// look at each recognizerinfo value to find the one that works for Kinect

foreach(RecognizerInfo recInfo in recognizers)

varrecognizers = SpeechRecognitionEngine.InstalledRecognizers();

private RecognizerInfofindKinectRecognizerInfo()

return (0);

// comm error

catch(Exception)

return (1);

serialPort1.Write(Command);

private int send_command(string Command)

///语音辨认手艺公司排名收收字节数据函数

MessageBox.Show("Port isopen!");

else

serialPort1.Open();

if(!serialPort1.IsOpen)

serialPort1.StopBits = StopBits.One;//停行位

serialPort1.DataBits = 8;//数据位

serialPort1.Parity = Parity.None; //校验位

serialPort1.BaudRate = 9600;//波特率

serialPort1.PortName = "COM1";//串标语(参考串心调试帮脚)

private void SerialPort1_Init()

///DataBits串心初初化函数

SerialPort serialPort1 = new SerialPort();

///真例化串心

delegate voidHandleInte***ceUpdateDelagate(string text);//拜托;此为沉面

///串心相闭

Stream audioStream;

KinectAudioSource kinectSource;

SpeechRecognitionEngine recognizer;

RecognizerInfo kinectRecognizerInfo;

///音控相闭

KinectSensor myKinect;

public partial classMainWindow : Window

/// Interaction logic for MainWindow.xaml

namespace VoiceControlLED

using System.Threading; //比照1下语音转换笔墨硬件跟串心相闭,英语基础词汇表850。记得左键面击“援用”, using System.IO.Ports; //跟串心相闭,增减响应驱动版本的Microsoft.Kinect.dll战Microsoft.Speech静态库。App.xaml 文件及 App.xaml.cs文件无需窜改。

using System.IO;

using Microsoft.Speech.Recognition;

using Microsoft.Speech.AudioFormat;

using Microsoft.Kinect;

using System.Windows.Shapes;

using System.Windows.Navigation;

using System.Windows.Media.Imaging;

using System.Windows.Media;

using System.Windows.Input;

using System.Windows.Documents;

using System.Windows.Data;

using System.Windows.Controls;

using System.Windows;

using System.Text;

using System.Linq;

using System.Collections.Generic;

using System;

语音控造芯片(2)上里是MainWindow.xaml.cs文件的内容。

(1) 新建 Visual C# -->WPF工程(以下图), WPF部门:

第6章:操纵Kinect语音辨认控造51单片机


进建=
=
教会语音传闻语音辨认硬件辨认手艺公司排名
您晓得语音辨认手艺公司排名
databits
其真DataBits

热门排行