class MAGES::Experimental::EmbodimentJARIA::MicrosoftCongitiveServices::AzureSpeechHandler

Overview

Class that handles speech recognition using Azure Cognitive Services. More…

class AzureSpeechHandler: public MAGES::Experimental::EmbodimentJARIA::ISpeechToTextHandler
{
public:
    // properties

    Agent TheAgent;
    SpeechConfig SpeechHandlerConfig;
    bool SpeechRecognized;
    bool WaitingForInput;
    string TextDuringRecognition;
    string RecognizedUserInput;

    // events

    event Recognizing();
    event UserInputRecorded();

    // methods

    void ResetRecognizedInput();
    async Task StartSpeechRecognitionAsync();
    async Task StopSpeechRecognitionAsync();
    void Startup();
    void ClearAllEvents();
};

Inherited Members

public:
    // properties

    Agent TheAgent;
    bool SpeechRecognized;
    string TextDuringRecognition;
    bool WaitingForInput;
    string RecognizedUserInput;

    // events

    event UserInputRecorded();
    event Recognizing();

    // methods

    Task StartSpeechRecognitionAsync();
    void ResetRecognizedInput();
    Task StopSpeechRecognitionAsync();
    void Startup();
    void ClearAllEvents();

Detailed Documentation

Class that handles speech recognition using Azure Cognitive Services.

Properties

Agent TheAgent

Gets or Sets the agent logic script.

SpeechConfig SpeechHandlerConfig

Gets the speech handler config.

bool SpeechRecognized

Gets a value indicating whether the user input has been recognized.

bool WaitingForInput

Gets or sets a value indicating whether the handler is waiting for input.

string TextDuringRecognition

Gets or sets the text during recognition.

string RecognizedUserInput

Gets or sets the recognized user input.

Events

event Recognizing()

Event that is triggered when the recognizer is recognizing.

Methods

void ResetRecognizedInput()

Resets the user’s recognized input.

async Task StartSpeechRecognitionAsync()

Starts the speech recognition.

Returns:

The executing task.

async Task StopSpeechRecognitionAsync()

Stops the speech recognition.

Returns:

The executing task.

void Startup()

Starts up the speech handler.

void ClearAllEvents()

Clears all the events subscribed to the handler.