🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

wit.ai with unity

Started by
0 comments, last by saraalaa8 3 years ago

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;

} }

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

This topic is closed to new replies.

Advertisement