Azure Speech SDK × HoloLens 2 (Emulator) 試行中
こちらのチュートリアルを参考に,Azure Speech SDK × HoloLens 2を試そうとしてました.
Azure Speech Services チュートリアル-1. 音声認識と議事録の統合と使用 - Mixed Reality | Microsoft Docs mixed-reality/mrlearning-speechSDK-ch1.md at master · MicrosoftDocs/mixed-reality · GitHub
Speech Service Region は "japaneast"にしました. エミュレータデプロイする前にまずエディタで軽く確認しようとしましたが,この画面でフリーズ.
ApplicationExceptionが出てしまった.そしてUnityは永続ループしたかのように停止できない. タスクマネージャでタスク終了するしかなかった…. StackTraceはこんな感じです.
ApplicationException: Exception with an error code: 0x13 (SPXERR_START_RECOGNIZING_INVALID_STATE_TRANSITION) Microsoft.CognitiveServices.Speech.Internal.SpxExceptionThrower.ThrowIfFail (System.IntPtr hr) (at
:0) Microsoft.CognitiveServices.Speech.Recognizer.StartContinuousRecognition () (at :0) Microsoft.CognitiveServices.Speech.Recognizer.DoAsyncRecognitionAction (System.Action recoImplAction) (at :0) Microsoft.CognitiveServices.Speech.SpeechRecognizer. b44_0 () (at :0) System.Threading.Tasks.Task.InnerInvoke () (at <437ba245d8404784b9fbab9b439ac908>:0) System.Threading.Tasks.Task.Execute () (at <437ba245d8404784b9fbab9b439ac908>:0) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <437ba245d8404784b9fbab9b439ac908>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <437ba245d8404784b9fbab9b439ac908>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <437ba245d8404784b9fbab9b439ac908>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <437ba245d8404784b9fbab9b439ac908>:0) System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () (at <437ba245d8404784b9fbab9b439ac908>:0) LunarcomWakeWordRecognizer+ 11.MoveNext () (at Assets/Lunarcom/Lunarcom Scripts/LunarcomWakeWordRecognizer.cs:82) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <437ba245d8404784b9fbab9b439ac908>:0) System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.d b__6_0 (System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0) UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at :0) UnityEngine.UnitySynchronizationContext:ExecuteTasks()
ここが怪しい.
Lunarcom Scripts/LunarcomWakeWordRecognizer.cs:82
BeginRecognizing()メソッド内のawaitのところの処理. 認識の開始がそもそもできてない?
public async void BeginRecognizing() { if (micPermissionGranted) { CreateSpeechRecognizer(); if (recognizer != null) { await recognizer.StartContinuousRecognitionAsync().ConfigureAwait(false); } } }
HL2 Emulatorで念のため試しても真っ黒でした.眠いのでここまで. クライアント側のエラーかサーバー側のエラーかまだ特定できてないです.明日までに解決したい. デバッグしよ…MRTK2のSamplesを見てみよう….もしご存じの方はお力添えを😭