You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MRTK3's DictationExmple scene is broken. Need to disable keyword recognition before enabling dictation. See code in NonNativeKeyboard for a possible solution:
/// <summary>
/// Start dictation on a DictationSubsystem.
/// </summary>
public void StartDictation()
{
var dictationSubsystem = XRSubsystemHelpers.DictationSubsystem;
if (dictationSubsystem != null && !isRecording)
{
isRecording = true;
UpdateDictationRecordIconColor();
keywordRecognitionSubsystem = XRSubsystemHelpers.KeywordRecognitionSubsystem;
if (keywordRecognitionSubsystem != null)
{
keywordRecognitionSubsystem.Stop();
}
ResetClosingTime();
dictationSubsystem.Recognized += OnDictationRecognizedResult;
dictationSubsystem.RecognitionFinished += OnDictationFinished;
dictationSubsystem.RecognitionFaulted += OnDictationFaulted;
dictationSubsystem.StartDictation();
}
}
/// <summary>
/// Called when dictation is completed
/// </summary>
/// <param name="eventData">Dictation event data</param>
private void OnDictationFinished(DictationSessionEventArgs eventData)
{
HandleDictationShutdown();
}
/// <summary>
/// Called when dictation is faulted
/// </summary>
/// <param name="eventData">Dictation event data</param>
private void OnDictationFaulted(DictationSessionEventArgs eventData)
{
Debug.LogError("Dictation faulted. Reason: " + eventData.Reason);
HandleDictationShutdown();
}
/// <summary>
/// Release references to dictation events
/// </summary>
private void HandleDictationShutdown()
{
var dictationSubsystem = XRSubsystemHelpers.DictationSubsystem;
if (dictationSubsystem != null)
{
dictationSubsystem.RecognitionFinished -= OnDictationFinished;
dictationSubsystem.RecognitionFaulted -= OnDictationFaulted;
dictationSubsystem.Recognized -= OnDictationRecognizedResult;
isRecording = false;
UpdateDictationRecordIconColor();
}
if (keywordRecognitionSubsystem != null)
{
keywordRecognitionSubsystem.Start();
keywordRecognitionSubsystem = null;
}
}
Repo Steps
Build and deploy a UWP containing the DictationExample scene
Original issue opened by:
AMollis
Overview
MRTK3's
DictationExmple
scene is broken. Need to disable keyword recognition before enabling dictation. See code inNonNativeKeyboard
for a possible solution:Repo Steps
DictationExample
sceneISSUE MIGRATION
Issue migrated from: microsoft/MixedRealityToolkit-Unity#11690
The text was updated successfully, but these errors were encountered: