Search code examples
androidunity-game-enginevoice-recognitionibm-watsonvirtual-reality

How to make IBM Watson VR Speech Sandbox work on Android after building in Unity3D


I need help with deployment of IBM Watson voice recognition on mobile from unity3D.

I'm working on a VR app for the Google cardboard. The idea is to cause events in the app to trigger based on voice commands. For instance, if I say "Hello", that word should trigger an action in the app.

Initially, it worked perfectly on HTC Vive and Oculus Rift. Now, I ported the same speech recognition code to mobile, and it has refused to work.

What to do? I decided to use IBM Watson STT(Speech To Text) and Conversation service to achieve the result I wanted using Watson SDK for Unity and IBM Speech Sandbox. It finally began to work on play mode in unity editor. I.e the app works perfectly, recognizing my voice or any other voice input and triggering the relative in-app action.

The issue now is this, once I build to an Android phone, connect to the internet (internet connection required for Watson to send data between my app and the cloud), turn on microphone option from app permission in app settings, it doesn't recognize my voice input or that of any other person. But in the editor, it works fine. I've tried all I could, done all the debugging I know, voice recognition is still not working on Cardboard.

Thanks for your time.


Solution

  • Android builds are not able to connect to TLS 1.2 endpoints. Please change your endpoints to

    conversation
    https://gateway-tls10.watsonplatform.net/conversation/api
    
    speech to text
    https://stream-tls10.watsonplatform.net/speech-to-text/api