Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Update packages #44

Open
E3V3A opened this issue Mar 30, 2018 · 1 comment
Open

Update packages #44

E3V3A opened this issue Mar 30, 2018 · 1 comment
Labels
INFO Purely informational issue (consider to add to wiki) npm-updates New npm package versions are available

Comments

@E3V3A
Copy link
Collaborator

E3V3A commented Mar 30, 2018

New packages available;

 @google-cloud/speech  ^1.3.0  →  ^1.4.0
 speaker               ^0.4.0  →  ^0.4.1
@E3V3A E3V3A added the npm-updates New npm package versions are available label Mar 30, 2018
@E3V3A
Copy link
Collaborator Author

E3V3A commented Apr 13, 2018

I have made some trials with the latest packages. This showed to be quite a PITA, but it now works.
The packages should now be ok with:

  },
  "dependencies": {
    "@google-cloud/speech": "^1.4.0",
    "aplay": "^1.2.0",
    "electron-rebuild": "^1.7.3",
    "google-assistant": "^0.2.2",
    "node-aplay": "^1.0.3",
    "node-record-lpcm16": "^0.3.0",
    "snowboy": "^1.2.0",
    "speaker": "^0.4.1"
  },
  "devDependencies": {
    "yarg": "^1.0.8"
  }

However! Raspberry pi foundation has pushed out two (!) new nodejs APT packages. So if you're still at v9.8.0, you have to update twice!! (yeah, fcuking crazy!) The second problem with those are that they insist using the outdated npm version of v5.6.0 instead v5.8.0. Important is that you will not get a working install with npm install, until you have updated these!

So the way to update is this:

sudo apt-get updates
sudo apt-get upgrade
sudo reboot now

# Check your node/npm versions
node -v && npm -v

sudo apt-get updates
sudo apt-get install nodejs     # v9.8.0  ==> v9.10.1
sudo apt-get updates
sudo apt-get install nodejs     # v9.10.1 ==> v9.11.1

date; time sudo npm install npm@latest -g        # ~4 min  // v5.6.0 ==> v5.8.0

rm -fr ./node_modules
date; time npm install                           # ~ ?? min
date; time ./node_modules/.bin/electron-rebuild  # ~21 min

AFAICT. The main difference is that the package that will be re-built this time, is not gRPC, which now has binaries, but snowboy, so it will be quicker. But who knows whats happening behind the scenes...

Then some package (I have no idea which) will mess up your ALSA config in ~/.asoundrc. So make a backup! and then copy it back.

For a USB card, it should look something like this:

pcm.!default {
  type asym
   playback.pcm {
     type plug
     slave.pcm "hw:1,0"
   }
   capture.pcm {
     type plug
     slave.pcm "hw:1,0"
   }
}

ctl.!default {
        type hw
        card 1
}

@E3V3A E3V3A added the INFO Purely informational issue (consider to add to wiki) label Apr 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INFO Purely informational issue (consider to add to wiki) npm-updates New npm package versions are available
Projects
None yet
Development

No branches or pull requests

1 participant