Intent & action with Code Snippets "component didn’t respond in a timely manner "

raspberry
snips
#1

Hey I just installed snips yesterday.

I tried to install the demo intents and actions from the doc (Create intents) with Code Snippets

Working through the doc I had the well known issue “component didn’t respond in a timely manner”
I had some other problems during installation as well, some are not directly mentioned in the doc at the position where I was at this time.

Course I didn’t find one topic that contain all the thinks I have to do, I will now create one for people like me.

Installation: (I will only mention topics I had problems with)
I want to install everything on a Raspberry PI 3 with respeaker 2 (not the kit)

Start with the installation (choose the sam installation) quick-start-raspberry-pi

For the reSpeaker install reSeapker module
(a link in the quick-start-guide oder in Hardware Recommendations - Microphones would be nice for me at the point of installation)

Next I created an account in https://console.snips.ai after that I added my first app. I forked a simple “helloWorld” app with a “simple voice feedback”


08

action:

result_sentence = "Test"
current_session_id = intentMessage.session_id
hermes.publish_end_session(current_session_id, result_sentence)

After that I deployed the app with sam install assistant and tryed the app.
Linke described here
With sam watch I could see that my intent was detected, but I got the “component didn’t respond in a timely manner” message.

After some hours of seaching I found that my action were not copied in the
/usr/share/snips/assistant/snippets/ folder during sam install assistant

The solution was to manually deploy the app manually without sam.

Download assistant and safe the zip file on your computer, copy the zip file to you pi
On Computer:
scp <path-to-assistant.zip> pi@<pi-name>.local:~

On Pi:
delete old files
sudo rm -rf /usr/share/snips/assistant/

unzip and copy the new assistant files
sudo unzip assistant_****.zip -d /usr/share/snips/

render the action “Code Snippets” with templates
snips-template render

then go to
cd /var/lib/snips/skills/YOUR-APP
run the setup script
./setup.sh

Start in a new tap
sam service log snips-skill-server
on your computer to output skill server logs and let it run for the next step

On Pi:
restart all components
sudo systemctl restart 'snips-*'

Check the skill server log output now

your action should be found like this

found action “/var/lib/snips/skills/YOUR_ASSISTANT_NAME.YOUR_APP_NAME/action-YOUR_ASSISTANT_NAME-YOUR-_NTENT_NAME-YOUR_ASSISTANT_NAME.YOUR-APP-NAME.py”

with now errors linke [ACTION_NAME][err] ....

This workflow worked for me.
Maybe I did something wrong with the sam deployment so pls correct me if I’m wrong.

#2

Hi @Taurus,

Thanks for all those details.

It shows some patches we can do in the doc to improve it.

The canonic way to proceed is to use sam from your mac or linux computer to install the platform, assistant and skills on your Rasberry Pi 3

I have few questions to understand better your flow,

  • Which OS do you use on your desktop computer?
  • You are using a Raspberry Pi 3 + Respeaker Pi Hat 2 with a raspbian stretch, right?
#3

hi @SakanaSan

thanks for the quick response ! :slight_smile:

You guys have a great software here, and I love to see that it is open source! Maybe I can help a bit to make it even better

I’m using macOS and I have some experience in working with terminal and linux

yes! (but not the B+, but this don’t matter, right?)

I just formated the SD card and trying to reproduce everything

Edit:
Installtion with sam install assistant -i ID works fine but only if I
sudo snips-template render afterwords. For my test-Apps with code snippets I also have to start the setup.sh as well

#4

Thanks!

Sure, part of it is open sourced (and not the smallest), check our repos here

  • hermes-protocol is the entry point for all the wrappers for Python and Javascript)
  • snips-nlu is our nlu pipeline
  • tract is our engine to execute inference models on devices.

Back to your issue,

As long as its a Pi 3 at least, it can run the whole platform.

The quick start guide should have worked directly.

I feel that thing started to get wrong at step 4.

sam setup audio on your mac should have helped you automate the installation of the respeaker board.

Regarding the message the component didn’t respond in a timely manner, it is a common pain point for most new comers.

The core mission of the snips platform is to act as a voice interface to other 3rd party programs.

The snips-skill-server is a kind of helper for user to quickly boot strap some action code to react to an intent detected by the platform.

Long story short every dialog session opened by the platform must be answered to (e.g. continueSession or endSession), otherwise the dialogue service will timeout and close the ongoing session.

Basically it is where begin the responsibility area of the assistant developer.

We are still fishing for feedbacks to explain that better.

[EDIT]
Also check this post