言语识别信心 [英] Speech Recognition Confidence
问题描述
我正在使用SpeechRecognitionEngine对象来检测一些短语(选项)
Hi, I am using SpeechRecognitionEngine Object to detect some phrases (choices )
但问题是,当我说一些其他单词(不是短语的一部分)时,它认为它属于一个短语,例如我只是通过空气(没有任何说话的字面意思)它虽然我说黄色
But the problem is when i say some other word (not part of phrases) it thinks that it belonged to one of phrases for example i just passes air (didnt speak literally anything) and it though i said yellow
当我说你好的时候 虽然我说黄色我训练了我的电脑,我正在使用Windows 8消费者预览
Also when i said hello it though i said yellow I have trained my computer and i am using windows 8 consumer preview
语音代码
Public WithEvents recog As New SpeechRecognitionEngine()
Public WithEvents recog As New SpeechRecognitionEngine()
Dim grammarbuilder As New System.Speech.Recognition.GrammarBuilder
  昏暗的选择As New System.Speech.Recognition.Choices({"red","green","blue","white","yellow","off"}))
grammarbuilder.Append(选项)
$
  Dim grammar As New System.Speech.Recognition.Grammar(grammarbuilder)
  recog.LoadGrammarAsync(语法)
recog.SetInputToDefaultAudioDevice()
Dim grammarbuilder As New System.Speech.Recognition.GrammarBuilder
Dim choices As New System.Speech.Recognition.Choices({"red", "green", "blue", "white", "yellow", "off"})
grammarbuilder.Append(choices)
Dim grammar As New System.Speech.Recognition.Grammar(grammarbuilder)
recog.LoadGrammarAsync(grammar)
recog.SetInputToDefaultAudioDevice()
Private Sub recog_SpeechRecognized(ByVal sender As Object,ByVal e As System.Speech.Recognition.SpeechRecognizedEventArgs)处理recog.SpeechRecognized
       Label2.Text =" Lamp is On"
如果(e.Result.Text ="red")和e.Result.Confidence> 0.8然后
SerialPort1.Write(1)
Dim text As String =" Color在日间变为红色:" &安培; TimeOfDay.Day& " 小时:" &安培; TimeOfDay.Hour - 12& "分钟:" &安培; TimeOfDay.Minute& vbNewLine
Label3.Text =" Color:Red"
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath&" \ledlog.txt",vbNewLine& text)
;      ElseIf(e.Result.Text ="yellow")和e.Result.Confidence> 0.7然后
SerialPort1.Write(5)
Label3.Text =" Color:Yellow"
Dim text As String =" Color colored to Yellow in Day:" &安培; TimeOfDay.Day& " 小时:" &安培; TimeOfDay.Hour - 12& "分钟:" &安培; TimeOfDay.Minute& vbNewLine
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath&" \ledlog.txt",vbNewLine& text)
ElseIf(e.Result.Text ="green")和e.Result.Confidence> 0.8然后
SerialPort1.Write(2)
Dim text As String =" Color colord to green on Day:" &安培; TimeOfDay.Day& " 小时:" &安培; TimeOfDay.Hour - 12& "分钟:" &安培; TimeOfDay.Minute& vbNewLine
Label3.Text =" Color:Green"
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath&" \ledlog.txt",vbNewLine& text)
;      ElseIf(e.Result.Text ="blue")和e.Result.Confidence> 0.8然后
SerialPort1.Write(3)
Dim text As String =" Color colord to blue on Day:" &安培; TimeOfDay.Day& " 小时:" &安培; TimeOfDay.Hour - 12& "分钟:" &安培; TimeOfDay.Minute& vbNewLine
Label3.Text =" Color:Blue"
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath&" \ledlog.txt",vbNewLine& text)
ElseIf(e.Result.Text ="white")和e.Result.Confidence> 0.8然后
SerialPort1.Write(4)
Dim text As String =" Color在白天变为白色:" &安培; TimeOfDay.Day& " 小时:" &安培; TimeOfDay.Hour - 12& "分钟:" &安培; TimeOfDay.Minute& vbNewLine
$
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath&" \ledlog.txt",vbNewLine& text)
;          Label3.Text =" Color:White"
ElseIf(e.Result.Text ="off")和e.Result.Confidence> 0.8然后
SerialPort1.Write(0)
Dim text As String =" Lamp on Day off:" &安培; TimeOfDay.Day& " 小时:" &安培; TimeOfDay.Hour - 12& "分钟:" &安培; TimeOfDay.Minute& vbNewLine
Label3.Text =" Color:NA"
Label2.Text =" Lamp is Off"
$
    System.IO.File.AppendAllText(My.Application.Info.DirectoryPath&" \ledlog.txt",vbNewLine& text)
结束如果是
End Sub
Private Sub recog_SpeechRecognized(ByVal sender As Object, ByVal e As System.Speech.Recognition.SpeechRecognizedEventArgs) Handles recog.SpeechRecognized
Label2.Text = "Lamp is On "
If (e.Result.Text = "red") And e.Result.Confidence > 0.8 Then
SerialPort1.Write(1)
Dim text As String = "Color Changed to red on Day: " & TimeOfDay.Day & " Hour: " & TimeOfDay.Hour - 12 & " Minute : " & TimeOfDay.Minute & vbNewLine
Label3.Text = "Color : Red "
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath & "\ledlog.txt", vbNewLine & text)
ElseIf (e.Result.Text = "yellow") And e.Result.Confidence > 0.7 Then
SerialPort1.Write(5)
Label3.Text = "Color : Yellow "
Dim text As String = "Color Changed to Yellow on Day: " & TimeOfDay.Day & " Hour: " & TimeOfDay.Hour - 12 & " Minute : " & TimeOfDay.Minute & vbNewLine
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath & "\ledlog.txt", vbNewLine & text)
ElseIf (e.Result.Text = "green") And e.Result.Confidence > 0.8 Then
SerialPort1.Write(2)
Dim text As String = "Color Changed to green on Day: " & TimeOfDay.Day & " Hour: " & TimeOfDay.Hour - 12 & " Minute : " & TimeOfDay.Minute & vbNewLine
Label3.Text = "Color : Green "
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath & "\ledlog.txt", vbNewLine & text)
ElseIf (e.Result.Text = "blue") And e.Result.Confidence > 0.8 Then
SerialPort1.Write(3)
Dim text As String = "Color Changed to blue on Day: " & TimeOfDay.Day & " Hour: " & TimeOfDay.Hour - 12 & " Minute : " & TimeOfDay.Minute & vbNewLine
Label3.Text = "Color : Blue "
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath & "\ledlog.txt", vbNewLine & text)
ElseIf (e.Result.Text = "white") And e.Result.Confidence > 0.8 Then
SerialPort1.Write(4)
Dim text As String = "Color Changed to white on Day: " & TimeOfDay.Day & " Hour: " & TimeOfDay.Hour - 12 & " Minute : " & TimeOfDay.Minute & vbNewLine
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath & "\ledlog.txt", vbNewLine & text)
Label3.Text = "Color : White "
ElseIf (e.Result.Text = "off") And e.Result.Confidence > 0.8 Then
SerialPort1.Write(0)
Dim text As String = "Lamp became off on Day: " & TimeOfDay.Day & " Hour: " & TimeOfDay.Hour - 12 & " Minute : " & TimeOfDay.Minute & vbNewLine
Label3.Text = "Color : NA "
Label2.Text = "Lamp is Off"
System.IO.File.AppendAllText(My.Application.Info.DirectoryPath & "\ledlog.txt", vbNewLine & text)
End If
End Sub
Idealprogrammer的编辑(一个有超过1300个免费小时.net视频的网站)www.idealprogrammer.com管理员在saurabhorange.com(免费网页设计教程)
Editor at Idealprogrammer ( A site with over 1300+ free hours of .net videos) www.idealprogrammer.com Admin at saurabhorange.com(Free webdesigning tutorials)
推荐答案
是的,我有一个文本程序的演讲,但它工作得很糟糕,我没有保留它。它显示的文字不断地说出错误的单词。
Yeah, I had a speech to text program but it worked so poorly that I didn't keep it. It continually got spoken words wrong for the text it displayed.
我对它的正常工作没有信心。
I have no confidence in it working properly.
我也有一个演讲程序和你的一样根据语音引擎收到的理解词(两个单词)设置Form backcolor。根本不适用。
I also have a speech program like yours that sets Form backcolor based on understood word (of two words) the speech engine receives. Doesn't work well at all.
这篇关于言语识别信心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!