简体   繁体   中英

Using Simple Voice Commands in Unity3D (with IBM Watson SDK)

The problem

I'm currently using Speech-To-Text from the IBM Watson SDK for Unity to recognize voice commands like start or quit by just checking if the recognized text contains one of them.

Problem is that it doesn't work very reliable (output is often spot or hit ) and I really just need those simple commands.

What I tried

Alternatively I already tried using UnityEngine.Windows.Speed; but I need it to work on both Windows and Mac . I couldn't find a good and working Mac solution and I tried writing my own Unity plugin with Xcode and NSSpeechRecognizer similar to this Tutorial but that didn't work for me.

I also saw Snowboy for hotword detection. But it requires a lot of setup and I would really wish for an easy and reliable solution.

Thanks in advance.

You should use both Watson Speech to Text and Assistant services for this use case. You can train an instance of Assistant to understand phrases like "start", "go", "initialize", etc to return an intent of START and phrases like "stop", "quit", "halt", etc to return an intent of QUIT . You can then send transcription of Speech to Text to the Assistant service which will return an intent of START or QUIT and execute game logic based on the returned intent.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM