Giter Site home page Giter Site logo

nheidloff / unity-watson-vr-sample Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 4.0 40.37 MB

Virtual Reality Sample using IBM Watson, Unity and Google Cardboard

License: Apache License 2.0

C# 90.89% Objective-C 0.04% Objective-C++ 0.06% ShaderLab 0.81% GLSL 0.14% HTML 8.07%
vr virtualreality unity3d ibm ibmwatson speech-recognition

unity-watson-vr-sample's Introduction

Virtual Reality Sample using IBM Watson, Unity and Google Cardboard

This project contains a simple Virtual Reality application which allows iPhone users with a Google Cardboard to move a player via voice commands and to ask a 3D character for weather information.

Check out the video for a short demo.

The picture shows a screenshot of the two cameras showing the 3D character. Users can move the player via voice commands and can have conversations with the character, for example:

  • User: Start to walk.
  • User: Stop.
  • User: How is the weather?
  • Character: In which location?
  • User: Munich.
  • Character: The temperature in Munich is currently 24 degrees.
  • User: How is the weather in Berlin?
  • Character: The temperature in Berlin is currently 28 degrees.

alt text

Technically the following services and tools are used:

Setup

Clone this repo and open the directory 'SimpleVR' in Unity.

Get an IBM Cloud account. The lite account is free (no credit card required, no time restriction) and supports the Watson services used in this sample.

Create a Watson Assistant instance and import workspace.json as a new workspace. Copy and paste the user name, user password and workspace id in SoldierConvo.js.

Create a Watson Speech To Text instance. Copy and paste the user name and user password in SoldierConvo.js.

Create a Watson Text To Speech instance. Copy and paste the user name and user password in SoldierConvo.js.

Create a Weather Company Data instance. Copy and paste the user name and user password in SoldierConvo.js.

Under build settings choose 'iOS' as platform.

After this you can run the application from within Unity. See the example script above.

Optionally you can replace the cylinder with a better 3D character, for example the cyber soldier.

Deployment to iPhone

Under iOS build/player settings some more properties need to be defined. See the screenshots folder for more details.

For 'Company Name' and 'Bundle Identifier' use a name that follows the iOS bundle identifier naming convention, for example 'net.heidloff.sample'.

Add 'Cardboard' as virtual reality SDK under 'XR Settings'.

Select 'Mute Other Audio Sources', 'Prepare iOS for Recording', 'Force iOS Speakers when Recording' and 'Allow downloads over HTTP' under the 'Configuration' section.

Add a textural description for the microphone usage.

Click 'Build' to generate an iOS build and open the *.xcworkspace file (not the *.xcodeproj file).

In order to fix the signing issues, unfortunately you need to change the following settings in Xcode every time after you've generated a new build. See the screenshots folder for more details.

Select 'Automatically manage signing' and your team under the 'General' tab.

With the 'Unity-iPhone' target selected, change all values to 'iOS Developer' for 'Code Signing Identity' on the 'Build Settings' tab.

With the 'Unity-iPhone Tests' target selected, change all values to 'iOS Developer' for 'Code Signing Identity' on the 'Build Settings' tab.

With the 'Unity-iPhone' project selected, change all values to 'iOS Developer' for 'Code Signing Identity' on the 'Build Settings' tab.

Connect your iPhone and press 'Build'.

After you've accepted the usage of the microphone, you can run the sample app.

unity-watson-vr-sample's People

Contributors

nheidloff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.