Why am I getting a list index out of range error for Watson Speech to Text

I’m getting a list index out of range error for speech to text with the new Watson sdk. The weird thing is that it only occurs with the japanese models. I can change the model to chinese and english and I don’t get the error. The only code I have changed from the ExampleStreaming.cs file is the following:

 public bool Active
        get { return _speechToText.IsListening; }
            if (value && !_speechToText.IsListening)

				//_speechToText.RecognizeModel = "zh-CN_BroadbandModel";
				//_speechToText.RecognizeModel = "en-US_BroadbandModel";
				_speechToText.RecognizeModel = "ja-JP_BroadbandModel";
                _speechToText.DetectSilence = true;
                _speechToText.EnableWordConfidence = true;
                _speechToText.EnableTimestamps = true;
                _speechToText.SilenceThreshold = 0.01f;
                _speechToText.MaxAlternatives = 0;
                _speechToText.EnableInterimResults = true;
                _speechToText.OnError = OnError;
                _speechToText.InactivityTimeout = -1;
                _speechToText.ProfanityFilter = false;
                _speechToText.SmartFormatting = true;
                _speechToText.SpeakerLabels = false;
                _speechToText.WordAlternativesThreshold = null;
                _speechToText.StartListening(OnRecognize, OnRecognizeSpeaker);
            else if (!value && _speechToText.IsListening)

Here is the error:
[02/26/2018 01:23:03][SpeechToText.OnListenMessage()][ERROR] Error: list index out of range
IBM.Watson.DeveloperCloud.Debug.DebugReactor:ProcessLog(LogRecord) (at Assets/Watson/Scripts/Debug/DebugReactor.cs:60)
IBM.Watson.DeveloperCloud.Logging.LogSystem:ProcessLog(LogRecord) (at Assets/Watson/Scripts/Logging/Logger.cs:196)
IBM.Watson.DeveloperCloud.Logging.Log:Error(String, String, Object) (at Assets/Watson/Scripts/Logging/Logger.cs:261)
IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText:OnListenMessage(Message) (at Assets/Watson/Scripts/Services/SpeechToText/v1/SpeechToText.cs:789)
IBM.Watson.DeveloperCloud.Connection.c__Iterator0:MoveNext() (at Assets/Watson/Scripts/Connection/WSConnector.cs:286)
IBM.Watson.DeveloperCloud.Utilities.Routine:MoveNext() (at Assets/Watson/Scripts/Utilities/Runnable.cs:128)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

I have the same problem with spanish (es-ES_BroadbandModel). Any help?

I have the same problem with ja-JP_BroadbandModel. Anyone know?

Same exact issue. Here’s where mine pops up

Line 791 of SpeechToText.cs

else if (json.Contains("error"))
                        string error = (string)json["error"];
                        Log.Error("SpeechToText.OnListenMessage()", "Error: {0}", error);
                        if (OnError != null)

And here’s an image of my inspection of json when I hit my breakpoints, it says “Children could not be evaluated”

Providing keywords to _speechToText.Keywords in the ExampleStreaming.cs seems to resolve this issue.

However it does occur if no keywords are provided. So still a bug, but this should allow you work around it for now.

This should have been cleared up with the latest SDK version in the asset store. Can you download the newest version and try again?