- Home /
Watson Text to speech not working
Hi, I just started working on Watson speech to text recognition in Unity 2018.3.14f1. The problem is I can't get it to work whenever I run it, it runs but doesn't catch my voice and throws an exception that "Access token not present in response". I am new to this so I don't really understand what the error actually is. In my console I have a total of 4 errors
[08/26/2019 12:01:06][RESTConnector.ProcessRequestQueue()][ERROR] URL: https://iam.cloud.ibm.com/identity/token, ErrorCode: 400, Error: HTTP/1.1 400 Bad Request, Response: {"context":{"requestId":"cb016290a97a4c569c66c8c54e8c5ae2","requestType":"incoming.Identity_Token","userAgent":"UnityPlayer/2018.3.14f1 (UnityWebRequest/1.0, libcurl/7.52.0-DEV)","clientIp":"196.62.166.231","url":"https://iam.cloud.ibm.com","instanceId":"iamid-4.3-6319-2d7e1b8-76674d8789-7rpds","threadId":"137ffe","host":"iamid-4.3-6319-2d7e1b8-76674d8789-7rpds","startTime":"26.08.2019 12:09:00:571 UTC","endTime":"26.08.2019 12:09:00:628 UTC","elapsedTime":"57","locale":"en_US","clusterName":"iam-id-prlon04-6r67"},"errorCode":"BXNIM0415E","errorMessage":"Provided API key could not be found"} UnityEngine.Debug:LogError(Object) IBM.Cloud.SDK.Debug.DebugReactor:ProcessLog(LogRecord) (at Assets/unity-sdk-core-0.3.0/Debug/DebugReactor.cs:60) IBM.Cloud.SDK.LogSystem:ProcessLog(LogRecord) (at Assets/unity-sdk-core-0.3.0/Logging/Logger.cs:207) IBM.Cloud.SDK.Log:Error(String, String, Object[]) (at Assets/unity-sdk-core-0.3.0/Logging/Logger.cs:280) IBM.Cloud.SDK.Connection.d__31:MoveNext() (at Assets/unity-sdk-core-0.3.0/Connection/RESTConnector.cs:593) IBM.Cloud.SDK.Utilities.Routine:MoveNext() (at Assets/unity-sdk-core-0.3.0/Utilities/Runnable.cs:131) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[08/26/2019 12:01:06][Credentials.OnRequestIamTokenResponse()][ERROR] Exception: System.ArgumentNullException: Array cannot be null. Parameter name: bytes at System.Text.Encoding.GetString (System.Byte[] bytes) [0x00012] in :0 at IBM.Cloud.SDK.Authentication.IamTokenManager.OnRequestIamTokenResponse (IBM.Cloud.SDK.Connection.RESTConnector+Request req, IBM.Cloud.SDK.Connection.RESTConnector+Response resp) [0x0006e] in C:\Users\owais\OneDrive\Desktop\Owais\Programming\Unity\AR Google Images\Assets\unity-sdk-core-0.3.0\Authentication\IamTokenManager.cs:140 UnityEngine.Debug:LogError(Object) IBM.Cloud.SDK.Debug.DebugReactor:ProcessLog(LogRecord) (at Assets/unity-sdk-core-0.3.0/Debug/DebugReactor.cs:60) IBM.Cloud.SDK.LogSystem:ProcessLog(LogRecord) (at Assets/unity-sdk-core-0.3.0/Logging/Logger.cs:207) IBM.Cloud.SDK.Log:Error(String, String, Object[]) (at Assets/unity-sdk-core-0.3.0/Logging/Logger.cs:280) IBM.Cloud.SDK.Authentication.IamTokenManager:OnRequestIamTokenResponse(Request, Response) (at Assets/unity-sdk-core-0.3.0/Authentication/IamTokenManager.cs:146) IBM.Cloud.SDK.Connection.d__31:MoveNext() (at Assets/unity-sdk-core-0.3.0/Connection/RESTConnector.cs:633) IBM.Cloud.SDK.Utilities.Routine:MoveNext() (at Assets/unity-sdk-core-0.3.0/Utilities/Runnable.cs:131) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[08/26/2019 12:01:06][Unity][CRITICAL] Unity Exception Exception: Access token not present in response : IBM.Cloud.SDK.Authentication.JwtTokenManager.SaveTokenInfo (IBM.Cloud.SDK.Authentication.TokenData tokenResponse) (at Assets/unity-sdk-core-0.3.0/Authentication/JwtTokenManager.cs:169) IBM.Cloud.SDK.Authentication.JwtTokenManager.OnGetToken (IBM.Cloud.SDK.DetailedResponse`1[T] response, IBM.Cloud.SDK.IBMError error) (at Assets/unity-sdk-core-0.3.0/Authentication/JwtTokenManager.cs:106) IBM.Cloud.SDK.Authentication.IamTokenManager.OnRequestIamTokenResponse (IBM.Cloud.SDK.Connection.RESTConnector+Request req, IBM.Cloud.SDK.Connection.RESTConnector+Response resp) (at Assets/unity-sdk-core-0.3.0/Authentication/IamTokenManager.cs:151) IBM.Cloud.SDK.Connection.RESTConnector+d__31.MoveNext () (at Assets/unity-sdk-core-0.3.0/Connection/RESTConnector.cs:633) IBM.Cloud.SDK.Utilities.Runnable+Routine.MoveNext () (at Assets/unity-sdk-core-0.3.0/Utilities/Runnable.cs:131) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
UnityEngine.Debug:LogError(Object) IBM.Cloud.SDK.Debug.DebugReactor:ProcessLog(LogRecord) (at Assets/unity-sdk-core-0.3.0/Debug/DebugReactor.cs:60) IBM.Cloud.SDK.LogSystem:ProcessLog(LogRecord) (at Assets/unity-sdk-core-0.3.0/Logging/Logger.cs:207) IBM.Cloud.SDK.Log:Critical(String, String, Object[]) (at Assets/unity-sdk-core-0.3.0/Logging/Logger.cs:295) IBM.Cloud.SDK.LogSystem:UnityLogCallback(String, String, LogType) (at Assets/unity-sdk-core-0.3.0/Logging/Logger.cs:168) UnityEngine.Application:CallLogCallback(String, String, LogType, Boolean)
Exception: Access token not present in response IBM.Cloud.SDK.Authentication.JwtTokenManager.SaveTokenInfo (IBM.Cloud.SDK.Authentication.TokenData tokenResponse) (at Assets/unity-sdk-core-0.3.0/Authentication/JwtTokenManager.cs:169) IBM.Cloud.SDK.Authentication.JwtTokenManager.OnGetToken (IBM.Cloud.SDK.DetailedResponse`1[T] response, IBM.Cloud.SDK.IBMError error) (at Assets/unity-sdk-core-0.3.0/Authentication/JwtTokenManager.cs:106) IBM.Cloud.SDK.Authentication.IamTokenManager.OnRequestIamTokenResponse (IBM.Cloud.SDK.Connection.RESTConnector+Request req, IBM.Cloud.SDK.Connection.RESTConnector+Response resp) (at Assets/unity-sdk-core-0.3.0/Authentication/IamTokenManager.cs:151) IBM.Cloud.SDK.Connection.RESTConnector+d__31.MoveNext () (at Assets/unity-sdk-core-0.3.0/Connection/RESTConnector.cs:633) IBM.Cloud.SDK.Utilities.Runnable+Routine.MoveNext () (at Assets/unity-sdk-core-0.3.0/Utilities/Runnable.cs:131) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
Please can anyone help? Much appreciated..
Answer by LongNguyenHoang · Mar 20, 2020 at 08:49 AM
I got the same problem. Have you found any way to fix it so far ? :<<