Optional Words Surrounding

Hey guys,
I could need a little help with the Optional Words Surrounding. So reduce my sentense.ini, I tried to use as many optional words as possible, to get it work.
[ChangeDeviceState]
[schalte | schalt | stell]{action:.state} [die | das] $device_name{device} $device_state{state}

My problem is now, that it technically it works, but on my mqtt Broker, the sended intent shows up as “schalte | schalt | stell” and not as “ChangeDeviceState”, as it should.

Is it possible to fix this? If not, is it possible to get another Surrounding for Optional Words?

Best regards

Alternatives are surrounded by parenthesis not brackets…

Brackets are used for an optional part.

Try:
[ ( schalte | schalt | stell ) ]

Also intents starting with a bracket should be escaped otherwise the content of the optional is used as intent name.

See « Special syntax » in:
https://rhasspy.readthedocs.io/en/latest/training/#basic-syntax

Hope this helps.

1 Like