synesthesiam / rhasspy

Rhasspy voice assistant for offline home automation
https://rhasspy.readthedocs.io
MIT License
950 stars 101 forks source link

Substitutions not working on 2.4.16 #147

Closed CommonBlob closed 4 years ago

CommonBlob commented 4 years ago

Ive been having issues with substitutions not working on 2.4.15 when I first installed, and since with .16 too.

I put them in, it trains fine, but the substitution is not done in the intent. Here is the sentences.ini entry:

[ChangeLightState]
light_name = ((hall light):hall){name}
light_state = (on | off) {state}

turn <light_state> [the] <light_name>
turn [the] <light_name> <light_state>

when i say, turn the hall light on it has hall light in name. No errors are shown in the log, here is the debug entry for this:

[DEBUG:6296083] __main__: {"text": "turn the hall light on", "intent": {"name": "ChangeLightState", "confidence": 1.0}, "entities": [{"entity": "name", "value": "hall light", "raw_value": "hall light", "start": 9, "raw_start": 9, "end": 19, "raw_end": 19}, {"entity": "state", "value": "on", "raw_value": "on", "start": 20, "raw_start": 20, "end": 22, "raw_end": 22}], "raw_text": "turn the hall light on", "tokens": ["turn", "the", "hall", "light", "on"], "raw_tokens": ["turn", "the", "hall", "light", "on"], "speech_confidence": 1, "slots": {"name": "hall light", "state": "on"}, "wakeId": "", "siteId": "default", "time_sec":

I have redownloaded profiles again since upgrading. Otherwise everything seems to work, with the exception of the substitution.

Btw, loving it so far, just wish i could get this working! :D

CommonBlob commented 4 years ago

Looks like an issue with fuzzywuzzy. Working fine with OpenFST.

synesthesiam commented 4 years ago

Thanks for pointing this out! This will actually be a problem with every other intent recognizer besides fsticuffs (OpenFST) because of substitutions and converters. I'm working on fixes now in a side branch.

synesthesiam commented 4 years ago

Fixed in master. Will be in the next Docker image.

CommonBlob commented 4 years ago

Thank you Michael!