npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

speech-service

v2.0.0

Published

WW Speech Service for Alexa & Assistant

Downloads

8

Readme

|Master|Develop|Code Climate|Test Coverage| |-----|-------|--------|---------| |Build Status|Build Status|Maintainability|Test Coverage|

Speech Service

Alexa and Google Assistant speech processing service.

Setup

This project depends on node 8.12.0

  1. Create a .npmrc file and add your secret NPM registry key as so: //registry.npmjs.org/:_authToken=<your-token-here>
  2. Run npm i
  3. Add a .env file to the root of your directory. You will need:
    DIALOGFLOW_KEY=""

Project Structure

We use a MVVM architecture, however instead of ViewModels, we use SpeechModels. Be sure to package your classes by Domain -- see the /domain folder for examples. All classes belong in the /model folder, and all services belong in the /services folder.

The /test folder contains unit tests and mock data used for testing.

Environments

We host 2 skills based on environment: WW (PROD | Master) & WW Alpha (QAT2 | Develop).

Alexa

Quick start guide for Alexa: https://developer.amazon.com/docs/devconsole/about-the-developer-console.html

See Alexa SDK documentation for node.js: https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs

WW (PROD):
https://developer.amazon.com/alexa/console/ask/build/amzn1.ask.skill.759c1075-911b-41c1-a160-2116d3737e64/development/en_US

WW Alpha (QAT2):
https://developer.amazon.com/alexa/console/ask/build/custom/amzn1.ask.skill.16a8e5ef-78fb-4f90-b62c-860b53468f8b/development/en_US/dashboard

Google Assistant

Quick start guide for DialogFlow: https://dialogflow.com/docs/getting-started

See Google's DialogFlow SDK for node JS: https://github.com/dialogflow/dialogflow-nodejs-client-v2

WW (PROD):
https://console.dialogflow.com/api-client/#/agent/a8d809bb-7bf7-4b17-b480-78cdf7d0781a/intents

WW Alpha (QAT2):
https://console.dialogflow.com/api-client/#/agent/35e11392-4702-4af5-85a4-a9ea4260c3d0/intents

Deployments

Deployments are managed via WW's trigger system using docker containers.

Process

Travis CI will test and build all commits into Develop and Master. Develop branches are designated to be deployed into QAT2, while Master are designated for PROD. At the end of every sprint, Develop is cut into Master. Upon sign off, Trigger is used to deploy PROD.

Both QAT2 and PROD environments use API url routing via Ingress. Upon every release, we alternate deployments to either v1 or v2. Each version points to a different docker container.

Alexa & Assistant Consoles

Both Alexa & Google Actions need to be submitted for approval in order to release new intents. Upon submission, the fulfillment endpoint is locked in place, which is why we must support multiple docker versions at the same time.

Trigger

Once your docker container has been pushed:

  1. Deploy your keys (config.env.json) to IDB trigger-oidc-curl -s -XPOST [email protected] https://idb.wwiops.io/v1/configs
  2. Deploy trigger script: trigger-oidc-curl -k -XPOST -d”@trigger.qat2.json" https://trigger.wwiops.io/betav1/speechnonprod/speech-service/qat2/us-east-1.aws
  3. To check the status of a deployment: triggerctl status —product speech-service --environment qat2 --group speechnonprod

Running locally, Tests & Lint

Docker

Running locally:

  1. Start your server by npm start
Tests

To run all tests: npm test

To run coverage (istanbul/nyc) test with report (results will be in coverage/nyc folder): npm run coverage

To generate test results report with mochawesome (results will be in coverage/mochawesome folder): npm run report

To run lint checks: npm run lint