Sample 02: Complex ASR

Description

The sample illustrates the use of an SRGS that wasn't created with the Simple SRGS Editor.

Two SRGS files are configured in the TwinCAT Speech configurator for this.

After starting the PLC, set the variable MainASR.bListenTrigger to TRUE. This starts the speech recognition. These commands are then recognized and saved in nValue.

Set value to <Number>

Increment value by <Number>

Decrement value by <Number>

Note: the sample is based on a file named en-US.grxml from Microsoft, which you can download from https://www.microsoft.com/en-us/download/confirmation.aspx?id=14373. Then add the file to the PLC project in the subfolder SRGS using "Add existing item". The file is transferred to the target system on activating the TwinCAT Speech configuration

With all TwinCAT Speech samples, a configuration is stored that uses the operating system's default sound card.

Note Activate the TwinCAT Speech configuration.

Sample project

TcSpeech_Samples_ASRcomplex_03.21.zip

Further information

Configuring a grammar file