Getting setup working with MathsCalculations

Can’t get this to work for some reason.

What I did:

On my Mac running macOS 10.14.5 with HomeBrew version 2.1.6, I installed Snips 0.63.2 (I think) following these instructions. On Console, I created an assistant with the ozie:MathsCalculations app. I downloaded the zip file and put it in /usr/local/share/snips (which is symlinked to a HomeBrew-managed directory).

Running:

Running snips-watch -vv, I see Snips hearing me calling it and correctly interpreting my intent.

Running node index.js, I see stuff being written to the screen (Snips Log) because of the file I created following aforementioned instructions.

I am hearing chimes over my speaker, and given it understands my intent obviously the microphone is also working.

Problem:

Although Snips understands my intent, nothing happens.

The snips-watch output shows [12:59:15] [Dialogue] session with id '5957d4e7-f034-45a6-8b6e-312c5c886908' was ended on site default. The session was ended because one of the component didn't respond in a timely manner.

Troubleshooting:

All services are running.

$ brew services list
Name               Status  User Plist
mosquitto          started rob  /Users/rob/Library/LaunchAgents/homebrew.mxcl.mosquitto.plist
snips-asr          started rob  /Users/rob/Library/LaunchAgents/homebrew.mxcl.snips-asr.plist
snips-audio-server started rob  /Users/rob/Library/LaunchAgents/homebrew.mxcl.snips-audio-server.plist
snips-dialogue     started rob  /Users/rob/Library/LaunchAgents/homebrew.mxcl.snips-dialogue.plist
snips-hotword      started rob  /Users/rob/Library/LaunchAgents/homebrew.mxcl.snips-hotword.plist
snips-nlu          started rob  /Users/rob/Library/LaunchAgents/homebrew.mxcl.snips-nlu.plist
snips-skill-server started rob  /Users/rob/Library/LaunchAgents/homebrew.mxcl.snips-skill-server.plist
snips-tts          started rob  /Users/rob/Library/LaunchAgents/homebrew.mxcl.snips-tts.plist

(note: snips-skill-server was not mentioned on the instructions page, but manually installed in an attempt to make things work)

sam is not functional for reasons unknown. However, given the fact that Snips picks up my assistant, I’m not fussed about this. But perhaps I’m wrong in not being fussed about it! :slight_smile:

My understanding is that the MathsCalculations app has built-in actions and I don’t need to program my own. It should respond with text-to-speech. But why it’s not doing that, I am not sure. Do I need to move certain files somewhere?

Help:

As this is my first time using Snips, I am not sure what the next steps are to be. I could go into building my own intents and actions, but I’d really first like to have something up and running so i know the ‘infrastructure’ is working before I start building my own stuff. I’ve had some help on the Discord server, but so far this has not lead to a resolution.

In short … please help!?

i don’t use SAM, so i don’t know the command for SAM to install skills

but yes you will need snips-skill-server installed and running

to manual install the snips apps like my calc app run this command
snips-skill-server install_skills

if you have apps installed and want to install them all clean and remove old ones use
snips-skill-server install_skills --clean

see if that helps

Hello @robdejonge,

sam is not functional for reasons unknown. However, given the fact that Snips picks up my assistant, I’m not fussed about this. But perhaps I’m wrong in not being fussed about it!

SAM is meant to target a raspberry pi (not MacOS) as written in the documentation page https://docs.snips.ai/reference/sam. (Sam is a Command Line Interface (CLI) tool created in order to easily setup and maintain Raspberry Pi and similar devices right from your computer…).

My understanding is that the MathsCalculations app has built-in actions and I don’t need to program my own. It should respond with text-to-speech. But why it’s not doing that, I am not sure. Do I need to move certain files somewhere?

I think this post might help: Action-Code timeout / Snips not responding, macOS, Quick Start Guide

Long story short, SAM would be the easy way for installing actions having code snippets as it compiles the snippet into a full fledged action.

to manual install the snips apps like my calc app run this command
snips-skill-server install_skills

Also that :slight_smile:. I always forgot about this command, but it should do the same processing as SAM does, and it should work on MacOS.

does… i run Snips on OSX here

Thanks, I appreciate your help.

Following your post, I understood that getting the actions installed required additional steps. To recreate a clean slate if you will, here is what I did:

  • Deleted /usr/local/Cellar/snips-platform-common/0.63.2/share/snips/assistant
  • Downloaded assistant_proj_xxx.zip again from Console
  • Ran sudo unzip <assistant.zip> -d /usr/local/Cellar/snips-platform-common/0.63.2/share/snips
  • Restarted all Brew-managed Snips services
  • Asked Snips “how much is two plus two”
  • The result was the same: intent recognized but no response.

I tried to run the command you suggested, snips-skill-server install_skills, but it returned an error about virtualenv not being available. Just for the hell of it, I tried again and I still got the error message.

[20:39:10] [Dialogue] session with id '8732a6da-f1db-46d7-a069-5e9afd4756ce' was ended on site default. The session was ended because one of the component didn't respond in a timely manner

So I continued with the documentation. At the bottom of this page, I saw additional actions were required to deploy the actions in the section “Deploy manually (without SAM)” :

  • I already had snips-skill-server installed.

  • Using the same command I used at install time, I tried to install brew install snips-template but found that this formula doesn’t exist in Homebrew.

  • I did not have virtualenv installed, and at no point was instructed to do that. I installed it using pip install virtualenv.

  • Next step is to run a usermod command, which does not work on macOS. Just doesn’t exist.

  • Then followed some commands around setup.sh, which I recognized from previously running the command you suggested. So I skipped all those steps and ran your command.

    $ snips-skill-server install_skills
    [21:06:08.658690] INFO :snips_skill_server_lib::installer: installing snippets
    21:06:08.659091] INFO :snips_skill_server_lib::installer: ->rendering templates
    [21:06:08.659832] INFO :snips_actions_templates_engine_lib: parsing snippets for app “/usr/local/share/snips/assistant/snippets/ozie.Calculator”
    [21:06:08.660062] INFO :snips_skill_server_lib::installer : ->running setup.sh
    [21:06:08.660166] INFO :snips_skill_server_lib::installer : Running setup.sh in “/usr/local/var/snips/skills/ozie.Calculator”
    [21:06:23.159193] INFO :snips_skill_server_lib::installer : installing git apps
    [21:06:24.515914] INFO :snips_skill_server_lib::installer : ->running setup.sh
    [21:06:24.515970] INFO :snips_skill_server_lib::installer : Running setup.sh in “/usr/local/var/snips/skills/ozie.Calculator”
    [21:06:25.158880] INFO :snips_skill_server_lib::installer : install done

No errors, nice!

Restarted all the services, and asked again: “hey snips, how much is two plus two?”

Eureka! Snips replied ‘that would be four’.

Thanks, @ozie, for your suggestion to get this up and running!

Thanks for this comment, too. I had overlooked the line commenting it was for Raspberry Pi only. Eventually, I do want to get Snips to run on a few Pi’s around my home (base+satellites) and so I’ll be using sam then.