I’m using version 2.4.20 and cannot currently upgrade because of technical problems with that version, but that is another issue.
I have understood the better part of the syntax for slots and sentences.
Now I have the following situation when I want to give a command to turn devices on or off. In German the most direct sentence would be: deviceName EINschalten
So the desired state EIN (=on) is included in the verb schalten (=switch), not a seperate word.
Now when speaking the command or just entering the text on the front page and using the “get intent” button the text needs to contain a space character for Rhasspy to provide me the full json block with slots.
In other words:
This works: EIN schalten
This doesn’t work: EINschalten
I’d think the first line would not work and second line would because the above config does not contain a space character.
Now when speaking the command I would not normally include a short pause, the the recognized result would normally be 1 word, which is why the intent is not recognized.
Does anybody have an idea how I could resolve that?
you can also do things like (einschalten:ein | (ausschalten | abschalten):aus){onOffState} This substiution feature is really usefull as you can see from my sentences that i posted.
For all the things you can do in your sentences take a look at this:
You can even do things like ((default|):default | something){thing} which will give you a value for nothing. This can be usefull if you want certain variations of a sentece to have different values for not saying a slot value.
If i speak: stell den wecker auf 9 uhr i will get the following slots:
tag: “morgen”
minute: “0”
stunde: 9
and as a text i will get "stell den wecker morgen auf 0 9 uhr"
I also got this sentences for the same intent:
(stell | stelle) [mir] (den | meinen |einen) wecker (für | auf) ((heute |):heute | morgen | übermorgen | $rhasspy/days){tag} [auf] (0..23){stunde} uhr (0..59){minute}
because of that "stell einen wecker auf 15 uhr 20" would result in the following slots:
tag: “heute”
stunde: 15
minute: 20