alexylem / jarvis

Jarvis.sh is a simple configurable multi-lang assistant.
http://openjarvis.com
MIT License
810 stars 197 forks source link

Question: How to concat keywords? #925

Open inftygit opened 5 years ago

inftygit commented 5 years ago

Description

Hello, I guess it's a stupid question, but I'm unable to figure it out. I searched the web site, but as I don't speak French, it's a little hard to understand. ;-) I'd like to use a command like "Licht an" or "Licht aus" to put on/put off my lights.

I added this command: *LICHT (*)== /home/pi/licht.sh (1)

licht.sh takes "AN" or "AUS" as an argument.

As keywords I registered "licht", "an", and "aus" with snowboy.

Now after saying the magic word ("computer") and saying "Licht an" snowboy recognizes both keywords "licht" (no. 7) and "an" (no. 2) which is quite fine. Unfortunately after that only the second keyword "an" is interpreted as the command. This of course fails, as there is no "AN" statement in the command file. I would expect that both keywords are concatenated to one command "LICHT AN" which would than be matched in the command file. What am I missing or doing wrong?

Output of "Troubleshooting mode":

Logs

pi: (listening...)
DEBUG: models=computer
INFO:snowboy:Ticks: [2, 20, 5, -1]
INFO:snowboy:Keyword 1 detected at time: 2019-03-03 14:26:33
INFO:snowboy:Ticks status: 2 2 1 1
DEBUG: modelid=0
computer
DEBUG: entering_cmd hook
pi: (listening...)
DEBUG: models=alexa,an,aus,computer,datum,gutenacht,licht,snowboy,temperatur,test,zeit
INFO:snowboy:Ticks: [2, 20, 5, -1]
INFO:snowboy:Keyword 7 detected at time: 2019-03-03 14:26:38
INFO:snowboy:Keyword 2 detected at time: 2019-03-03 14:26:39
INFO:snowboy:Ticks status: 2 2 0 1
DEBUG: modelid=1
an
DEBUG: start_speaking hook "I did not understand: an"
computer: I did not understand: an
DEBUG: stop_speaking hook
DEBUG: exiting_cmd hook
thebenius commented 4 years ago

Unfortunately I have the same issue. Any solutions?