

Now open the ExampleStream.cs file using a text editor and add these lines into the ExampleStream class after the declaration of ResultsField as following to declare the MeshRenderer and 3 materials as public variables. Create 3 asset materialsĪdd code to set colors of the sphere via voice command Name the materials red_sphere, green_sphere, yellow_sphere and set the color for each of them accordingly.

Next step is to create 3 asset materials correspondingly to the 3 colors we want to set for the sphere. 3D Unity project viewĪfter that, add a Sphere and Plane 3D Game Object to the project (GameObject > 3D Object on the menu) Once the sdk-core and sdk artifacts are completely downloaded, pick the ExampleStreaming in the examples list to add into the project. Use git to clone the SDKs from IBM’s github to the Assets directory: $ git clone Import IBM Watson SDK for Unity to your Unity projectĬreate a 3D Unity project under which an Assets directory will be generated. You can either use the auto-generated key or create a new one as necessary. Once the service’s been created, navigate to the service’s Dashboard and grasp the “API Key” token to use later in the code. You first need to create a Watson STT service instance in IBM Cloud by logging to the platform using your IBM ID, then search for “Text to speech” from the Catalog and follow the instruction. Be familiar with Unity IDE and game engineĬreate a Watson Speech to Text (STT) service instance in IBM Cloud:.The tutorials below is for Mac environment. The app accepts voice command from user through the iOS device’s microphone and changes color of a 3D sphere accordingly.
#Add ibm watson speech to text how to#
In this post, we will create a simple VR iOS app to showcase how to use IBM Watson SDK for Unity to add voice interface to an application.
