I'm following a course to learn augmented reality, using AI with unity
I have trained app on wit.ai to use to open the car door in my application it takes command as input with voice “openDriversDoor”
part of code
void Handle (string jsonString) {
if (jsonString != null) {
RootObject theAction = new RootObject ();
Newtonsoft.Json.JsonConvert.PopulateObject (jsonString, theAction);
if (theAction.entities.open != null) {
foreach (Open aPart in theAction.entities.open) {
Debug.Log (aPart.value);
carController.instance.triggerAnimation("openDriversDoor");
myHandleTextBox.text = aPart.value;
actionFound = true;
}
if (!actionFound) {
myHandleTextBox.text = "Request unknown, please ask a different way.";
} else {
actionFound = false;
} }
![](https://uploads.gamedev.net/forums/monthly_2021_06/df0e062e737449e3873c4039f7f75e91.Screenshot-2021-06-28-at-2.59.59-AM.png)
![](https://uploads.gamedev.net/forums/monthly_2021_06/eaca34218cec4f40876b15620660346a.Screenshot-2021-06-28-at-2.54.40-AM.png)
While input using my voice I get “Request unknown, please ask a different way. ”but in wit.ai it already recognizes my voice as it shows here in the screenshot