日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class DictationHandler

    Script used to start and stop recording sessions in the current dictation system and report the transcribed text via UnityEvents. For this script to work, a dictation system like 'Windows Dictation Input Provider' must be added to the Data Providers in the Input System profile.

    Inheritance
    Object
    InputSystemGlobalHandlerListener
    BaseInputHandler
    DictationHandler
    Implements
    IMixedRealityDictationHandler
    IEventSystemHandler
    Inherited Members
    BaseInputHandler.IsFocusRequired
    BaseInputHandler.OnEnable()
    BaseInputHandler.Update()
    InputSystemGlobalHandlerListener.EnsureInputSystemValid()
    Namespace: Microsoft.MixedReality.Toolkit.Input
    Assembly: cs.temp.dll.dll
    Syntax
    public class DictationHandler : BaseInputHandler, IMixedRealityDictationHandler, IEventSystemHandler

    Fields

    OnDictationComplete

    Event raised when the recognizer stops. Contains the final recognized string.

    Declaration
    public DictationHandler.StringUnityEvent OnDictationComplete
    Field Value
    Type Description
    DictationHandler.StringUnityEvent

    OnDictationError

    Event raised when an error occurs. Contains the string representation of the error reason.

    Declaration
    public DictationHandler.StringUnityEvent OnDictationError
    Field Value
    Type Description
    DictationHandler.StringUnityEvent

    OnDictationHypothesis

    Event raised while the user is talking. As the recognizer listens, it provides text of what it's heard so far.

    Declaration
    public DictationHandler.StringUnityEvent OnDictationHypothesis
    Field Value
    Type Description
    DictationHandler.StringUnityEvent

    OnDictationResult

    Event raised after the user pauses, typically at the end of a sentence. Contains the full recognized string so far.

    Declaration
    public DictationHandler.StringUnityEvent OnDictationResult
    Field Value
    Type Description
    DictationHandler.StringUnityEvent

    Properties

    AudioClip

    Get the last audio clip from the dictation session

    Declaration
    public AudioClip AudioClip { get; }
    Property Value
    Type Description
    AudioClip

    IsListening

    Get the listening state

    Declaration
    public bool IsListening { get; }
    Property Value
    Type Description
    Boolean

    Methods

    OnDisable()

    Declaration
    protected override void OnDisable()
    Overrides
    BaseInputHandler.OnDisable()

    RegisterHandlers()

    Overload this method to specify, which global events component wants to listen to. Use RegisterHandler API of InputSystem

    Declaration
    protected override void RegisterHandlers()
    Overrides
    InputSystemGlobalHandlerListener.RegisterHandlers()

    Start()

    Declaration
    protected override void Start()
    Overrides
    BaseInputHandler.Start()

    StartRecording()

    Start a recording session in the dictation system.

    Declaration
    public void StartRecording()

    StopRecording()

    Stop a recording session in the dictation system.

    Declaration
    public void StopRecording()

    UnregisterHandlers()

    Overload this method to specify, which global events component should stop listening to. Use UnregisterHandler API of InputSystem

    Declaration
    protected override void UnregisterHandlers()
    Overrides
    InputSystemGlobalHandlerListener.UnregisterHandlers()

    Explicit Interface Implementations

    IMixedRealityDictationHandler.OnDictationComplete(DictationEventData)

    Declaration
    void IMixedRealityDictationHandler.OnDictationComplete(DictationEventData eventData)
    Parameters
    Type Name Description
    DictationEventData eventData

    IMixedRealityDictationHandler.OnDictationError(DictationEventData)

    Declaration
    void IMixedRealityDictationHandler.OnDictationError(DictationEventData eventData)
    Parameters
    Type Name Description
    DictationEventData eventData

    IMixedRealityDictationHandler.OnDictationHypothesis(DictationEventData)

    Declaration
    void IMixedRealityDictationHandler.OnDictationHypothesis(DictationEventData eventData)
    Parameters
    Type Name Description
    DictationEventData eventData

    IMixedRealityDictationHandler.OnDictationResult(DictationEventData)

    Declaration
    void IMixedRealityDictationHandler.OnDictationResult(DictationEventData eventData)
    Parameters
    Type Name Description
    DictationEventData eventData

    Implements

    IMixedRealityDictationHandler
    IEventSystemHandler
    Back to top Generated by DocFX