简体   繁体   English

检测用户的音频并将其转换为文本以在Unity中命令AI机器人

[英]Detect audio from the user and converte to text to command AI bots in Unity

I am making a game where I want to command the AI using word i speak. 我正在制作一个游戏,我想用我说的话命令AI。 Say for example I can say go and AI bot goes to certain distance. 例如,我可以说去,而AI机器人则走了一定距离。

Question is I am finding asset and no provider is giving me grantee that it is possible ? 问题是我在寻找资产,没有提供者给我受赠人这可能吗?

What are the difficulties for doing it? 这样做有什么困难?

I am programmer so if some one suggest the way to handle it I can do it. 我是程序员,所以如果有人建议处理的方式,我可以做到。

Should I make mic listener on all the time and read audio and then pass audio to some external sdk which can convert my voice to text ? 我是否应该一直使麦克风成为听众,然后阅读音频,然后将音频传递到一些可以将我的语音转换为文本的外部SDK?

these are the asset provider i have contacted. 这些是我联系过的资产提供商。

https://www.assetstore.unity3d.com/en/#!/content/73036 https://www.assetstore.unity3d.com/en/#!/content/73036

https://www.assetstore.unity3d.com/en/#!/content/45168 https://www.assetstore.unity3d.com/en/#!/content/45168

https://www.assetstore.unity3d.com/en/#!/content/47520 https://www.assetstore.unity3d.com/en/#!/content/47520

and few more ! 还有更多! If someone just explains the steps I need to follow then I can try it for sure. 如果有人只是解释了我需要遵循的步骤,那么可以肯定地尝试一下。

I am currently using this external api for pretty much the same thing: https://api.ai/ 我目前正在将此外部api用于几乎相同的事情: https : //api.ai/

It comes with a unity SDK that works quite well: https://github.com/api-ai/api-ai-unity-sample#apiai-unity-plugin 它带有一个运行良好的统一SDK: https//github.com/api-ai/api-ai-unity-sample#apiai-unity-plugin

You have to connect a audio source to the sdk, and tell it to start listening. 您必须将音频源连接到sdk,并告诉它开始收听。 It will then convert your voice audio to text, and even detect pre-selected intentions from your voice audio / text. 然后它将语音音频转换为文本,甚至从语音音频/文本中检测预先选择的意图。

You can find all steps on how to integrate the unity plugin in the api.ai Unity SDK documentation on github. 您可以在github上的api.ai Unity SDK文档中找到有关如何集成unity插件的所有步骤。

EDIT: It's free too btw :) 编辑:它也是免费的顺便说一句:)

If you want to recognize offline without sending data to the server, you need to try this plugin: 如果您想脱机识别而不将数据发送到服务器,则需要尝试以下插件:

https://github.com/dimixar/unity3DPocketSphinx-android-lib https://github.com/dimixar/unity3DPocketSphinx-android-lib

It uses open source speech recognition engine CMUSphinx 它使用开源语音识别引擎CMUSphinx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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