我正在尝试按照[1]的自述文件中的步骤进行操作:https://github.com/watson-developer-cloud/unity-sdk但是,出现以下错误:
FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <c95265f74fdf4905bfb0d5a4b652216c>:0)
System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <c95265f74fdf4905bfb0d5a4b652216c>:0)
System.String.Format (System.String format, System.Object[] args) (at <c95265f74fdf4905bfb0d5a4b652216c>:0)
IBM.Watson.DeveloperCloud.Logging.LogRecord..ctor (IBM.Watson.DeveloperCloud.Logging.LogLevel level, System.String subSystem, System.String messageFmt, System.Object[] args) (at Assets/Watson-sdk/Scripts/Logging/Logger.cs:91)
IBM.Watson.DeveloperCloud.Logging.Log.Debug (System.String subSystem, System.String messageFmt, System.Object[] args) (at Assets/Watson-sdk/Scripts/Logging/Logger.cs:216)
ExampleStreaming+<RecordingHandler>c__Iterator0.MoveNext () (at Assets/Watson-sdk/Examples/ServiceExamples/Scripts/ExampleStreaming.cs:112)
IBM.Watson.DeveloperCloud.Utilities.Runnable+Routine.MoveNext () (at Assets/Watson-sdk/Scripts/Utilities/Runnable.cs:128)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
IBM.Watson.DeveloperCloud.Utilities.Routine:.ctor(IEnumerator) (at Assets/Watson-sdk/Scripts/Utilities/Runnable.cs:114)
IBM.Watson.DeveloperCloud.Utilities.Runnable:Run(IEnumerator) (at Assets/Watson-sdk/Scripts/Utilities/Runnable.cs:47)
ExampleStreaming:StartRecording() (at Assets/Watson-sdk/Examples/ServiceExamples/Scripts/ExampleStreaming.cs:89)
ExampleStreaming:Start() (at Assets/Watson-sdk/Examples/ServiceExamples/Scripts/ExampleStreaming.cs:53)
和
[02-15-2018 19:17:07][Unity][CRITICAL]
UnityEngine.Debug:LogError(Object)
IBM.Watson.DeveloperCloud.Debug.DebugReactor:ProcessLog(LogRecord) (at Assets/Watson-sdk/Scripts/Debug/DebugReactor.cs:60)
IBM.Watson.DeveloperCloud.Logging.LogSystem:ProcessLog(LogRecord) (at Assets/Watson-sdk/Scripts/Logging/Logger.cs:196)
IBM.Watson.DeveloperCloud.Logging.Log:Critical(String, String, Object[]) (at Assets/Watson-sdk/Scripts/Logging/Logger.cs:274)
IBM.Watson.DeveloperCloud.Logging.LogSystem:UnityLogCallback(String, String, LogType) (at Assets/Watson-sdk/Scripts/Logging/Logger.cs:157)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
IBM.Watson.DeveloperCloud.Utilities.Routine:.ctor(IEnumerator) (at Assets/Watson-sdk/Scripts/Utilities/Runnable.cs:114)
IBM.Watson.DeveloperCloud.Utilities.Runnable:Run(IEnumerator) (at Assets/Watson-sdk/Scripts/Utilities/Runnable.cs:47)
ExampleStreaming:StartRecording() (at Assets/Watson-sdk/Examples/ServiceExamples/Scripts/ExampleStreaming.cs:89)
ExampleStreaming:Start() (at Assets/Watson-sdk/Examples/ServiceExamples/Scripts/ExampleStreaming.cs:53)
BTW我也收到了这两条日志消息:
[02-21-2018 17:34:39][SpeechToText.CreateListenConnector()][DEBUG] Created listen socket. Model: en-US_BroadbandModel, parsedParams:
UnityEngine.Debug:Log(Object)
IBM.Watson.DeveloperCloud.Debug.DebugReactor:ProcessLog(LogRecord) (at Assets/Watson/Scripts/Debug/DebugReactor.cs:68)
IBM.Watson.DeveloperCloud.Logging.LogSystem:ProcessLog(LogRecord) (at Assets/Watson/Scripts/Logging/Logger.cs:196)
IBM.Watson.DeveloperCloud.Logging.Log:Debug(String, String, Object[]) (at Assets/Watson/Scripts/Logging/Logger.cs:216)
IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText:CreateListenConnector() (at Assets/Watson/Scripts/Services/SpeechToText/v1/SpeechToText.cs:635)
IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText:StartListening(OnRecognize, OnRecognizeSpeaker) (at Assets/Watson/Scripts/Services/SpeechToText/v1/SpeechToText.cs:494)
ExampleStreaming:set_Active(Boolean) (at Assets/Watson/Examples/ServiceExamples/Scripts/ExampleStreaming.cs:82)
ExampleStreaming:Start() (at Assets/Watson/Examples/ServiceExamples/Scripts/ExampleStreaming.cs:58)
和
There are 0 candidate types
UnityEngine.Debug:Log(Object)
FullSerializer.PlayStateNotifier:ModeChanged(PlayModeStateChange) (at Assets/Watson/ThirdParty/FullSerializer/Aot/Editor/fsAotConfigurationEditor.cs:28)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)