Action-Code timeout / Snips not responding, macOS, Quick Start Guide

I followed the Quick Start Guide for macOS, but I am not able to receive a spoken response by Snips. Hotword and Intent detection work according to the logs. I also hear the sound-effects for ‘start listening’ and ‘stop listening’.

What can I do?
Is there any way to test the TTS service?
I also tried triggering it manually without success: mosquitto_pub -h localhost -t 'hermes/tts/say' -m '{"text": "Bonjour!", "siteId": "default"}'

Hi progmem64,

Can you try adding the language field in the message body?

mosquitto_pub -h localhost -t 'hermes/tts/say' -m '{"text": "Bonjour!", "siteId": "default", "lang": "fr"}'

It worked, thanks. I guess the documentation is wrong then because the ‘lang’ attribute is marked as optional.

So the TTS service is not the reason why my Snips Assistants are not responding. Every interaction ends with

[Dialogue] session with id '2df6bfc2-4a7a-4336-8875-1d342caf25a6' was ended on site default. The session was ended because one of the component didn't respond in a timely manner

Great :+1:

I guess the documentation is wrong then because the ‘lang’ attribute is marked as optional.

I had a look at this page it is clearly mentioned that if the lang parameter is not specified, the locale will be gb_GB (which “voice” does not seem to be installed in the french macos version).

Just for my information, were you looking somewhere else? (so that we can clarify things there)

It seems that you have no action(s) code running that caught the detected intent.
In order to make the TTS “speak”, you need action code that will perform an action depending on the intent, and continue or end the session by publishing an end/continue session message containing the text to be spoken.

If none of those messages are published during 15 seconds, the session will timeout and you won’t hear anything from the TTS. (just a beep)

I know that I am running into a timeout after the intent was published but I cannot figure out what exactly the problem is with the attached action.
My first guess was that the session handler waits for the TTS engine which does not work because my first test (see the initial post) was not successful.

But as this is not the case, it could be the action-code.
The action-code is directly embedded into the generated assistant-package as python script (added via snips-console) that ends by publishing the end-session message:

[...] hermes.publish_end_session(current_session_id, result_sentence)

Is there an easy way to check if the python script got executed by the snips service?

The action-code is directly embedded into the generated assistant-package as python script

Unfortunately we don’t support embedded action code snippets on macos as of today, so I think the issue comes from there :confused:. (SAM compiles the snippet)

In order to run action code on macos, you can either:

  • Put your actions in /usr/local/var/snips/skills/ and brew install snips-skill-server that will run them automatically if the service is started.
  • Or run the action code in a shell directly.

Unfortunately we don’t support embedded action code snippets on macos as of today

Really helpful, thank you. I think someone should mention this restriction in the Quick Start Guide.

I’ll try your suggestions asap.

2 Likes

Agreed, can the action snippet restriction to macOS be added to the MacOS quick start guide? I just lost some time to this as well.

1 Like

I had to search a lot before I found this.