Yet another "The session was ended because one of the component didn't respond in a timely manner"

raspberry

#1

I’ve already read a couple of url=https://forum.snips.ai/t/dialogue-session-didnt-respond-in-a-timely-manner/176/4]threads[/url] from people with the same issue, but no solution for me.

I get the following error: The session was ended because one of the component didn't respond in a timely manner.

No errors in syslog:

Mar 12 17:52:16 raspberrypi snips-asr[12033]: INFO:snips_asr_lib::asr        : decoded: [Recognition { decoded_string: "what \'s the weather going to be tomorrow in chicago", likelihood: 1.0, tokens: Some([Token { value: "what", confidence: 1.0, time: (0.0, 0.98999995), range: 0..4 }, Token { value: "\'s", confidence: 1.0, time: (0.98999995, 1.0799999), range: 5..7 }, Token { value: "the", confidence: 1.0, time: (1.0799999, 1.38), range: 8..11 }, Token { value: "weather", confidence: 1.0, time: (1.38, 1.56), range: 12..19 }, Token { value: "going", confidence: 1.0, time: (1.56, 1.86), range: 20..25 }, Token { value: "to", confidence: 1.0, time: (1.86, 1.9499999), range: 26..28 }, Token { value: "be", confidence: 1.0, time: (1.9499999, 2.28), range: 29..31 }, Token { value: "tomorrow", confidence: 1.0, time: (2.28, 2.73), range: 32..40 }, Token { value: "in", confidence: 1.0, time: (2.73, 2.82), range: 41..43 }, Token { value: "chicago", confidence: 1.0, time: (2.82, 4.2), range: 44..51 }]) }]
Mar 12 17:52:16 raspberrypi snips-asr[12033]: INFO:snips_asr_hermes          : Cleanup
Mar 12 17:52:16 raspberrypi snips-asr[12033]: INFO:snips_asr_hermes          : Preparing decoder
Mar 12 17:52:16 raspberrypi snips-audio-server[12035]: INFO:snips_audio_portaudio      : Playing "2691d342-7ccb-4ff7-b95e-2aa36d41aa91" using output "default", wav spec: WavSpec { channels: 2, sample_rate: 22050, bits_per_sample: 16, sample_format: Int }
Mar 12 17:52:17 raspberrypi snips-asr[12033]: INFO:snips_asr_hermes          : Idle
Mar 12 17:52:17 raspberrypi snips-audio-server[12035]: INFO:snips_audio_portaudio      : Playing of "2691d342-7ccb-4ff7-b95e-2aa36d41aa91" finished
Mar 12 17:52:17 raspberrypi snips-tts[12017]: WARN:snips_tts_hermes: Received a "play finished" message from audio server with an unknown id '2691d342-7ccb-4ff7-b95e-2aa36d41aa91'. It could be normal if you have more than one audio server.
Mar 12 17:52:23 raspberrypi snips-dialogue[12026]: INFO:snips_dialogue_lib::coordinator::coordinator: Session [7922a739-61b2-4d3b-a7c9-12a9243c19b1]: closing session which was active: Timeout
Mar 12 17:52:23 raspberrypi snips-dialogue[12026]: INFO:snips_dialogue_lib::coordinator::coordinator: Site [default]: reset site -> turn off ASR and turn on Hotword
Mar 12 17:52:23 raspberrypi snips-hotword[12021]: INFO:snips_hotword_lib::audio    : Audio thread for site default started.

Nothing useful in snips-watch -vvv:

[17:52:16] [Asr] captured text "what 's the weather going to be tomorrow in chicago" in 4.0s
[17:52:16] [Asr] was asked to stop listening on site default
[17:52:16] [AudioServer] was asked to play a wav of 93.1 kB with id '2691d342-7ccb-4ff7-b95e-2aa36d41aa91' on site default
[17:52:17] [AudioServer] finished playing wav with id '2691d342-7ccb-4ff7-b95e-2aa36d41aa91'
[17:52:17] [Nlu] was asked to parse input "what 's the weather going to be tomorrow in chicago"
[17:52:17] [Nlu] detected intent searchWeatherForecast with confidence score 0.962 for input "what 's the weather going to be tomorrow in chicago"
              Slots ->
                 forecast_start_datetime -> 2019-03-13 00:00:00 +01:00 (confidence: 1.000)
                       forecast_locality -> Chicago (confidence: 1.000)
[17:52:17] [Dialogue] New intent detected searchWeatherForecast with confidence 0.962
              Slots ->
                 forecast_start_datetime -> 2019-03-13 00:00:00 +01:00 (confidence: 1.000)
                       forecast_locality -> Chicago (confidence: 1.000)
[17:52:23] [Dialogue] session with id '7922a739-61b2-4d3b-a7c9-12a9243c19b1' was ended on site default. The session was ended because one of the component didn't respond in a timely manner
[17:52:23] [Asr] was asked to stop listening on site default
[17:52:23] [Hotword] was asked to toggle itself 'on' on site default

I am running the apt install on a rpi, with the snips-platform-demo. Skills folder looks as described in the troubleshooting guide.

I have tried various skills from the store, but no luck.
Hope you guys can help out.


#2

Hi @Tystnad,

you can also output the services logs with the following command.

journalctl -u "snips-*" -f

Another thing that could help

It seems that the hotword, asr, nlu and dialog are OK

So, the culprit left are the other services such as snips-tts or snips-skills-server

If there is not enough logs in the output of journalctl, you can stop those services

sudo systemctl stop snips-tts snips-skill-server

and start them manually in a terminal

sudo -u _snips snips-tts -v

and in another terminal

sudo -u _snips snips-skill-server -v

#3

To be sure tough, did you install the demo with sam install demo?


#4

Ok, we found the issue.

Thanks for your feedback.

The version of hermes-python in https://github.com/snipsco/snips-skill-weather-tts/blob/master/requirements.txt was not up to date.

You can update the demo with

sam install demo

[SOLVED] N00b: no voice output for Weather skill?
#5

Hey @SakanaSan,

Thanks for your responses. I am running the manual installation through apt-get, not using sam right now.

I could not get sam to work with key-only ssh login.

Is there a way for me to update without sam? (or to get sam working on a pre-installed pi that is also running a couple of other things)


#6

It turns out, I have neither a command nor a service called snips-skill-server.

After installing (through apt-get), and starting it directly with -v, I get

[16:55:54.972482] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skill_dir -> Ok(None)
[16:55:54.972921] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skill_dir -> Ok(None)
[16:55:54.973074] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skills_root_dir -> Ok(None)
[16:55:54.973203] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skills_root_dir -> Ok(None)
[16:55:54.973485] ERROR:snips_skill_server   : failed to fetch skills
 -> caused by: didn't find any skills in root skills directorie(s) ["/var/lib/snips/skills"] nor skill directorie(s) []

Not sure why it would look there, I’d expect it to look in /usr/share/snips/skills.


#7

This output is normal when executing the skill server when no skill is installed.

sudo -u _snips snips-skill-server -v

prompt

[16:30:54.880240] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skill_dir -> Ok(None)
[16:30:54.880645] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skill_dir -> Ok(None)
[16:30:54.880749] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skills_root_dir -> Ok(None)
[16:30:54.880873] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skills_root_dir -> Ok(None)
[16:30:54.881096] ERROR:snips_skill_server   : failed to fetch skills
 -> caused by: didn't find any skills in root skills directorie(s) ["/var/lib/snips/skills"] nor skill directorie(s) []

/var/lib/snips/skills is the correct skills folder on debian based distribution

Did you execute the command sam install demo?
Can you then execute ls -la /var/lib/snips/skills and provide its output?

And also, to ensure that your installation is correct, can you provide the output of sam status?


#8

I am not using sam, I installed by

sudo apt-get update
sudo apt-get install -y dirmngr
sudo bash -c 'echo "deb https://raspbian.snips.ai/$(lsb_release -cs) stable main" > /etc/apt/sources.list.d/snips.list'
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys D4F50CDCA10A2849
sudo apt-get update
sudo apt-get install -y snips-platform-voice

and
sudo apt-get install snips-platform-demo.

As described in the manual installation guide.

/var/lib/snips/skills is empty. There are however skills in /usr/share/snips/skills, put there by installing snips-platform-demo.

I also tried manually installing an assistent by
sudo unzip /home/pi/assistant.zip -d /usr/share/snips/ (as described in the manual linked above).

Is the manual incorrect?


#9

Ok, now I know which path you took :slight_smile:

The preferred way is to use SAM as it will give you useful shorthands to deal with the platform configuration.

Thanks for pointing it out, the manual installation tutorial is incomplete regarding the platform demo installation.
At this point, skills are not installed at the end of the setup procedure (its also weird that snips-skill-server is not installed)
We’ll handle that on our side asap

Meanwhile, check the following documentation: https://docs.snips.ai/articles/console/actions/deploying-your-skills#deploy-manually-without-sam

You’ll then see why its easier to use sam :confounded:

The skills you found in the /usr/share/snips/skills are code snippets. They need to be rendered into action skills. They are used when you add code in your app directly on the console.

In the case of the snips-weather-demo assistant, the following skill need to be retrieved from github: https://github.com/snipsco/snips-skill-weather-tts

(sam install demo simplify this procedure)