akeller / Unity-AI-AR

Code for a corresponding Medium tutorial for an AI AR iOS App
https://medium.com/@MissAmaraKay/build-your-first-ai-ar-app-on-unity-8c12895687fa
10 stars 3 forks source link
ai artificial-intelligence augmented-reality ios unity-tutorial unity3d watson-conversation watson-speech-to-text watson-text-to-speech

Not tested for Watson SDK for Unity version 3+, please use 2.x until this content is updated.

Unity-AI-AR

A little AI AR project to get you up and running with IBM Watson and Unity.

Start over here: https://medium.com/@MissAmaraKay/build-your-first-ai-ar-app-on-unity-8c12895687fa

Want something more complete? https://github.com/akeller/Starter-AR-Project

alt text

Configuring Watson Services

This section is broken up into two different processes, one for Speech-To-Text and Text-To-Speech, the other for Assistant fka Conversation (as it requires a little more work).

Speech-to-Text and Text-to-Speech

Create an IBM Cloud account if you haven't already.

Click "Catalog" in the upper menu. This will take you to the list of available services, platforms, and other offerings on the IBM Cloud. To make it simple, use the column menu and click "Watson" at the very bottom. This will filter the catalog to just show Watson Services.

alt text

Click on either Speech-to-Text or Text-to-Speech to start the provisioning of the service. The steps below will outline the process for Speech-to-Text but will be identical for Text-to-Speech.

Name the service, and select a region/location to deploy in. If applicable, choose an organization and space or leave it to the default if you only have one of each.

alt text

For pricing plans, keep the Lite plan, but notice the first 100 minutes are free per month.

alt text

Click "Create" and wait for the service to provision. This may take some time.

Once the service is provisioned successfully, click on Service credentials.

alt text

Expand "View credentials" to reveal your username and password. Enter these as strings in the C# script to access the API.

alt text

Repeat the same process for Text-to-Speech.

Assistant (previously Conversation)

Create an IBM Cloud account if you haven't already.

Click "Catalog" in the upper menu. This will take you to the list of available services, platforms, and other offerings on the IBM Cloud. To make it simple, use the column menu and click "Watson" at the very bottom. This will filter the catalog to just show Watson Services.

alt text

Click on Assistant to start the provisioning of the service.

Name the service, and select a region/location to deploy in. If applicable, choose an organization and space or leave it to the default if you only have one of each.

alt text

For pricing plans, keep the Lite plan, but notice your limits.

alt text

Click "Create" and wait for the service to provision. This may take some time.

Once the service is provisioned successfully, click on the Launch Tool button. This opens the Watson Assistant tool and may require you to login again.

alt text

The page that loads contains your workspaces. Click the icon to import a workspace.

alt text

Import the json file from the Pizza Ordering Code Pattern. Choose the file and import everything. This will create a new workspace with all the intents, entities, and dialog intact.

Click the new workspace tile to open it.

alt text

Click the Deploy icon.

Click Credentials (next to Deploy Options). Copy your workspace ID, username and password. Enter these as strings in the C# script to access the API.

alt text

...

Alternatively, from the IBM Cloud Conversation page (page where the Launch tool button sits), click "Service credentials" then expand "View credentials" to reveal your username and password. Enter these as strings in the C# script to access the API. This does not show your workspace ID.

alt text

Resources