我在Unity程序中使用IBM Watson Speech- to -Text来识别语音。在识别语音的onRecognize()方法中,我放置了一个if语句,如果该语句识别出关键字"go“,则该语句将调用一个方法。尽管当"go“这个词被识别出来时,该方法会被调用两到三次,而不是像它应该调用的那样调用一次,这会导致程序不能以它应该的方式工作。 我想不出任何解决方案,因为我不能做太多来改变代码。 //All of this is inside of the onRecognize() method
string text = string.Format("{0} ({1}
我对团结计划有个问题。HoloLens应用程序更具体。我增加了关键字识别从MixedReality-Toolkit为团结。直到现在一切都很好。今天,我不得不重新设置我的笔记本电脑,并安装所有新的。重置后一切正常,但是在激活我的Windows 10教育许可证以启用Hyper-V之后,我现在得到以下错误消息:
UnityException: Speech recognition is not supported on this machine.
UnityEngine.Windows.Speech.PhraseRecognizer.CreateFromKeywords (System.String
我试图在Unity中使用语音识别功能,但是当我尝试使用它时,Visual并没有识别它。
这是我的密码:
using UnityEngine;
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Windows.Speech;
using System.Linq;
public class VoiceRecog : MonoBehaviour {
private KeywordRecognizer m_Recogniz