This will look like a lot of steps but I’m covering everything in details with a lot of screenshots, it usually takes about 15 minutes max. So once you got your game running, you will need to export and set up this integration. The VoiceBot is communicating with a plugin on the final exported project. The Windows10Interop class got two functions, one to request speech, another to stop the listening session. The Text item itself is used to render the possible questions. These are used to hide or show the questions you can ask, depending on how far away you are from the bot. It needs to target a panel that got the dialogue Text in it, as well as the Text itself. Also, the Windows10Interop class needs to be in the project solution, as this is the logic that will communicate with the plugin itself. You can of course modify how it interacts with your own game logic. To use the plugin, you must add the VoiceBot script to the gameobject. This video explains the basics of what’s going on with the technical parts of the plugin.įor an in-depth session about Speech Synthesis, Voice Recognition and Cortana Integration, I recommend checking out this session from BUILD 2015: This got nothing to do with the in-game experience itself, but enables Cortana to launch your game, as well as write custom logic using an App Service (a service that runs as a background task in your app).Ĥ) Then we got the logic we need to add to our exported game itself to bind everything together. Currently, this takes a few questions with associated answers, feeds it to the Speech and Voice APIs, sets up a listening session and so on.ģ) The other solution is the logic that enables you to integrate Cortana with your game. This code controls everything, and enables you to decide how to voice activate your game world.Ģ) Then we got one solution that needs to be added to the exported Windows 10 UWA solution that implements the interaction between your Unity game and the Windows 10 APIs. We are implementing a fair bit of features here, so to help you get an overview, we are focusing on 4 components today.ġ) We got the code that needs to be executed inside of Unity. You will also most likely use this in a very customized way, something that will be very simple to do once you understand the basics. If you wish to add this to your own game, you will need to know this and follow the steps given. If you don’t want to know any of this, feel free to download the sample project and try it for yourself. There are a lot of different ways of doing this, but I decided to implement it in this way to keep your focus on the important things that is happening. This blog post is all about using the Windows 10 APIs for integrating Speech Synthesis, Voice Recognition and Cortana with your Unity 5.2 games.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |