Search Results for

    Show / Hide Table of Contents

    Class AbstractSpeechToText

    Abstract class for speech to text system. Concrete implementations are used by PlayerCharacter component for receiving speech.

    Inheritance
    Object
    AbstractSpeechToText
    DictationRecognizerSTT
    NPCEngineSTT
    Namespace: NPCEngine.Components
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class AbstractSpeechToText : MonoBehaviour

    Properties

    Context

    Consumed context to be used in the next STT request

    Declaration
    public string Context { protected get; set; }
    Property Value
    Type Description
    String

    Methods

    SpeechRecognized(String)

    Declaration
    protected void SpeechRecognized(string result)
    Parameters
    Type Name Description
    String result

    StartListening()

    Called when system must start listening for speech.

    Declaration
    public abstract void StartListening()

    StopListening()

    Called when system should stop listening for speech.

    Declaration
    public abstract void StopListening()

    Events

    OnSpeechRecognitionFailed

    Can be used to handle speech recogintion errors

    Declaration
    public event Action<string> OnSpeechRecognitionFailed
    Event Type
    Type Description
    Action<String>

    OnSpeechRecognized

    PlayerCharacter subscribes to this event to get the Speech-to-Text result

    Declaration
    public event Action<string> OnSpeechRecognized
    Event Type
    Type Description
    Action<String>
    In This Article
    Back to top npc-engine Unity integration