SNIPS Logger / python script


#1

Need that for months, so finally done it:

A simple python script that listen topics in background and log activities. So when something get wrong, and you are not ever running sam watch, you can check afterward which wakeword triggered what …

Have it running on my master, and I now can read the log in jeedom when not at home / sshed on the pi. Easier debug ! :wink:


#2

can just use the syslog to check things when snips-watch is not running
something like
tail -n 10000 /var/log/syslog | grep "snips"


#3

You can’t compare the output of the two …


#4

you can still check for when something goes wrong when snips-watch is not running… and can filter even further by altering the grep command to narrow down the results. everything your logging is already being logged by snips to the syslog

as a side note, adding something to your code to gather sentences that were not understood that can then be used to copy and paste into the console to add as training to make the NLU better would be a great added feature


#5

I’m not even sure we are talking about the same thing …

Here is what I got with your command

Nov 27 07:17:31 salle snips-audio-server[27009]: INFO:snips_audio_portaudio : Playing “e23cedd2-45f0-4974-8473-97336ff27fda” using output “default”, wav spec: WavSpec { channels: 1, sample_rate: 16000, bits_per_sample: 16, sample_format: Int }
Nov 27 07:17:43 salle snips-audio-server[27009]: INFO:snips_audio_portaudio : Playing of “e23cedd2-45f0-4974-8473-97336ff27fda” finished
Nov 27 07:17:43 salle snips-dialogue[27005]: WARN:snips_dialogue_lib::coordinator::coordinator: No Session found for this response: AudioPlayFinished(AudioFinishedPayload)
Nov 27 07:17:43 salle snips-dialogue[27005]: WARN:snips_dialogue_lib::coordinator::coordinator: No Session found for this response: TtsSayFinished(TtsFinishedPayload)
Nov 27 07:42:28 salle snips-audio-server[27009]: INFO:snips_audio_portaudio : Playing “736fa707-1b8c-42b3-93a4-726b5a3ae8d3” using output “default”, wav spec: WavSpec { channels: 1, sample_rate: 16000, bits_per_sample: 16, sample_format: Int }

Nothing about what has been said for example.

With my script, I have all that has happened yesterday with wakeword detected, which one, on which site, what asr understood, what actions answered, what tts command said, etc.

example:

26-11-2018 20:05:17 | ON_HOTWORD | SiteId: salle | modelId: snips_mySon
26-11-2018 20:05:17 | ON_LISTENING | SiteId: salle
26-11-2018 20:05:21 | ON_THINK | SiteId: salle | text: éteins la musique
26-11-2018 20:05:22 | ON_SUCCESS | SiteId: None | intent: {u’intentName’: u’kiboost:TurnOffJeedom’, u’probability’: 0.6465649}
27-11-2018 07:17:30 | ON_SAY | SiteId: salle | text: sorry won’t make public anything I said.
27-11-2018 07:42:28 | ON_SAY | SiteId: salle | text: sorry won’t make public anything I said.
27-11-2018 07:45:47 | ON_SAY | SiteId: salle | text: sorry won’t make public anything I said.
27-11-2018 08:19:26 | ON_SAY | SiteId: salle | text: sorry won’t make public anything I said.

Here all is concise and readable with all information …

For example, I was able in a few second to see along the day which personal wakeword was making false detection, and reduced its sensitivity.

But no problem, use what fits your needs :wink: