FB_SpeechRecognition

FB_SpeechRecognition 1:

Automatic Speech Recognition function block

Syntax

Definition:

FUNCTION_BLOCK FB_SpeechRecognition
VAR_INPUT
    bListen                 : BOOL;
    nConfigurationId        : UINT;
END_VAR
VAR_OUTPUT
    bBusy                   : BOOL;
    bError                  : BOOL;
    nErrorId                : ETcsSpeechCommandExitCode;
    eRecognitionEngineState : ETcsRecognitionEngineState;
    nRecognitionId          : ULINT;
    fRecognitionConfidence  : REAL;
    nLastCommandExitCode    : UINT;
    sRecognitionTag         : STRING(255);
    sRecognitionRule        : STRING(255);
    sRecognitionUtterance   : STRING(4095);
END_VAR

FB_SpeechRecognition 2: Inputs

Name

Type

Description

bLists

BOOL

Rising edge starts speech recognition.

nConfigurationId

UINT

ConfigurationID to be used for speech recognition.

FB_SpeechRecognition 3: Outputs

Name

Type

Description

bBusy

BOOL

Function block is busy.

bError

BOOL

Function block is in error state.

nErrorId

ETcsSpeechCommandExitCode

ErrorId, which indicates the exact reason for the error.

eRecognitionEngineState

ETcsRecognitionEngineState

State of the ASR engine.

nRecognitionId

ULINT

Last recognized speech recognition (RecognitionId).

fRecognitionConfidence

REAL

Recognition reliability of the last speech recognition

nLastCommandExitCode

UINT

Return value of the last call

sRecognitionTag

STRING(255)

Last Recognition tag

sRecognitionRule

STRING(255)

Last rule that was recognized.

sRecognitionUtterance

STRING(4095)

Last Utterance that was recognized.

FB_SpeechRecognition 4: Methods

Name

Description

SetAmsNetAddr

Method to specify a different AmsNetAdr for the TcSpeech service. Only needs to be called up once.

Required License

TC3 Speech