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" not working #601

Closed doukasd closed 5 years ago

doukasd commented 5 years ago

ExampleStreaming is not working. Consequently, it's not clear to a developer new to this how to get Speech-to-Text to work using IBM Watson...

Steps to reproduce:

[10/16/2019 13:37:38][SpeechToText.KeepAlive()][DEBUG] KeepAlive exited.
UnityEngine.Debug:Log(Object)
IBM.Cloud.SDK.Debug.DebugReactor:ProcessLog(LogRecord) (at Assets/IBM/unity-sdk-core-1.0.0/Debug/DebugReactor.cs:68)
IBM.Cloud.SDK.LogSystem:ProcessLog(LogRecord) (at Assets/IBM/unity-sdk-core-1.0.0/Logging/Logger.cs:207)
IBM.Cloud.SDK.Log:Debug(String, String, Object[]) (at Assets/IBM/unity-sdk-core-1.0.0/Logging/Logger.cs:229)
IBM.Watson.SpeechToText.V1.<KeepAlive>d__226:MoveNext() (at Assets/IBM/unity-sdk-4.0.0/Scripts/Services/SpeechToText/V1/SpeechToTextServiceExtension.cs:554)
IBM.Cloud.SDK.Utilities.Routine:MoveNext() (at Assets/IBM/unity-sdk-core-1.0.0/Utilities/Runnable.cs:131)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
mamoonraja commented 5 years ago

@doukasd thanks for opening the issue, It looks like problem might be that your mic is not picking up the audio and service is exiting after not detecting anything in a while. There should be a log for which device you are connected to, it should look like: devices: Built-in Microphone or whatever device you are using. For debugging purposes can you confirm if you see any other error before KeepAlive exited.

doukasd commented 5 years ago

Thank you for the quick response. There is no error I am afraid. My mic device is picked up correctly too.

Unity_2019-10-16_16-53-52

doukasd commented 5 years ago

Following @mamoonraja 's advice, adding _service.SetServiceUrl(_serviceUrl); after this line sets the _serviceUrl correctly and then the example works fine!

I guess we can leave this issue open until this is part of the next release/master.

Thank you.