watson-developer-cloud / unity-sdk

:video_game: Unity SDK to use the IBM Watson services.
Apache License 2.0
569 stars 206 forks source link

[Speech to Text] ExampleStreaming does not work with the latest versions of Unity SDKs #608

Closed MoonRock1961 closed 4 years ago

MoonRock1961 commented 4 years ago

ExampleStreaming in Unity SDK works well with the previous version pair of unity-sdk-4.0.1 + unity-sdk-core-1.0.0, but it does not work with the latest pair of 4.1.0 + 1.1.0 on my Windows PCs with Unity 2019.2.12 and 2019.2.14 and the following 2 errors has occurred:

1.[Unity][CRITICAL] Unity Exception ArgumentNullException: Value cannot be null. Parameter name: The serviceUrl must not be empty or null. : IBM.Cloud.SDK.BaseService..ctor (IBM.Cloud.SDK.Authentication.Authenticator authenticator, System.String serviceId) (at Assets/IBMSdkCore/BaseService.cs:70) IBM.Watson.SpeechToText.V1.SpeechToTextService..ctor (IBM.Cloud.SDK.Authentication.Authenticator authenticator) (at Assets/Watson/Scripts/Services/SpeechToText/V1/SpeechToTextService.cs:63) IBM.Watsson.Examples.ExampleStreaming+<CreateService>d__11.MoveNext () (at Assets/Watson/Examples/ExampleStreaming.cs:81) IBM.Cloud.SDK.Utilities.Runnable+Routine.MoveNext () (at Assets/IBMSdkCore/Utilities/Runnable.cs:131) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17) UnityEngine.Debug:LogError(Object) IBM.Cloud.SDK.Debug.DebugReactor:ProcessLog(LogRecord) (at Assets/IBMSdkCore/Debug/DebugReactor.cs:60) IBM.Cloud.SDK.LogSystem:ProcessLog(LogRecord) (at Assets/IBMSdkCore/Logging/Logger.cs:207) IBM.Cloud.SDK.Log:Critical(String, String, Object[]) (at Assets/IBMSdkCore/Logging/Logger.cs:295) IBM.Cloud.SDK.LogSystem:UnityLogCallback(String, String, LogType) (at Assets/IBMSdkCore/Logging/Logger.cs:168) UnityEngine.Application:CallLogCallback(String, String, LogType, Boolean) (at C:/buildslave/unity/build/Runtime/Export/Application/Application.cs:121) 2.ArgumentNullException: Value cannot be null. Parameter name: The serviceUrl must not be empty or null. IBM.Cloud.SDK.BaseService..ctor (IBM.Cloud.SDK.Authentication.Authenticator authenticator, System.String serviceId) (at Assets/IBMSdkCore/BaseService.cs:70) IBM.Watson.SpeechToText.V1.SpeechToTextService..ctor (IBM.Cloud.SDK.Authentication.Authenticator authenticator) (at Assets/Watson/Scripts/Services/SpeechToText/V1/SpeechToTextService.cs:63) IBM.Watsson.Examples.ExampleStreaming+<CreateService>d__11.MoveNext () (at Assets/Watson/Examples/ExampleStreaming.cs:81) IBM.Cloud.SDK.Utilities.Runnable+Routine.MoveNext () (at Assets/IBMSdkCore/Utilities/Runnable.cs:131) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)

mamoonraja commented 4 years ago

Hi @miwatsuki, Thanks for opening the issue, I just tried in MAC and was not able to reproduce the issue. Let me get to my window machine and try it again. Thanks!

jkredzvr commented 4 years ago

@miwatsuki are you running into this error in editor or on a build. I am getting a similar error in my build. In editor (2019.2.10f1) I've been able to run the speech to text sample scene

mamoonraja commented 4 years ago

I have found the issue, releasing a fix soon.

mamoonraja commented 4 years ago

Should be fixed in the new core version: https://github.com/IBM/unity-sdk-core/releases/tag/v1.1.1. Please let me know if that fixes the issue.

mamoonraja commented 4 years ago

@miwatsuki I am closing the issue as the fix is out now, please comment and re-open the issue if you run into the same issue again.