【发布时间】:2016-09-21 08:50:06
【问题描述】:
我目前正在使用 Vuforia 开发一个增强现实项目,该项目使用语音识别来控制 Unity 中的对象。我只是在寻找一个示例工作代码。
【问题讨论】:
标签: c# unity3d speech-recognition augmented-reality vuforia
我目前正在使用 Vuforia 开发一个增强现实项目,该项目使用语音识别来控制 Unity 中的对象。我只是在寻找一个示例工作代码。
【问题讨论】:
标签: c# unity3d speech-recognition augmented-reality vuforia
Unity 尚未内置此功能。他们已经在上面做research 很长时间了,这很可能很快就会被添加到 Unity 中。您可以从资产商店here 获得有效的 Speech-to-Text(免费)。它是开源的,如果您发现任何问题,可以帮助contribute。
附带说明,几乎每个操作系统都有语音识别 API。您可以通过将所有这些 API 包装到 C# 中的一个 sing 类中轻松地制作一个插件,然后使用 Unity's platform preprocessor directives 根据您的游戏运行在哪个操作系统上确定要调用哪个。
安卓:
看到这个项目https://github.com/gsssrao/UnityAndroidSpeechRecognition
iOS:
MacOS:
Windows:
看到这个项目https://github.com/LightBuzz/Speech-Recognition-Unity
例子:
class CrazySpeechRecognition
{
#if UNITY_ANDROID
Use SpeechRecognizer class
#endif
#if UNITY_IOS
Use SFSpeechRecognizer class
#endif
#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
Use NSSpeechRecognizer class
#endif
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
Use SpeechRecognitionEngine class
#endif
}
如链接中所述,Unity 的免费 Speech-to-Text 很遗憾已停产。
【讨论】:
您可以尝试 Watson Unity SDK:https://github.com/watson-developer-cloud/unity-sdk^ 特别是 ExampleSpeechToText
【讨论】: