问题
I'm trying to create my own Unity project with speech recognition in Hololens. I copy pasted the instructions from tutorial.
Literally copy pasted the SpeechManager.cs
file and SphereCommands.cs
file to my project but it won't budge. I tried putting some sounds in:
KeywordRecognizer_OnPhraseRecognized
to see if I get there (even before invoking anything), but I don't.
I start the keywordRecognizer.Start()
(also added sounds to make sure I was there) but I have no idea if it's working afterwards.
The machine itself works, because if I open the Origami program, it recognizes my voice without issues. Also, saying "Hey Cortana" from the program also works.
I would copy the code, but it's just the file from the tutorial (even the phrases).
回答1:
As Nikolay wrote in the comments, the answer is that I didn't enable the Microphone in the Unity Project (Edit -> Project Settings -> Player). I also had to remove the UWP directory and rebuild in Unity is it will be relevant.
来源:https://stackoverflow.com/questions/37552600/speech-recognition-doesnt-work-in-unity-hololens-project