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

api_sc-voice_net

v9.0.10

Published

SuttaCentral Voice Server

Downloads

8

Readme

api.sc-voice.net

NodeJS server for voice.suttacentral.net

Installation

Prerequisites

  • Linux Debian 10 or Ubuntu 20.04
  • Nodejs 16.x
  • Server credentials for AWS Polly account

Local installation

Initialization requires super user access for your computer and you may be asked to enter your computer superuser password.

git clone https://github.com/sc-voice/api_sc-voice_net
cd api_sc-voice_net
install

To run api_sc-voice_net locally on port 3000:

scripts/sc-voice --port:3000

Linode installation

./scripts/init.sh

Now update the content but do not reboot (i.e., Respond with no when asked to reboot)

./scripts/update-latest

As part of installation you will need to configure the AWS Polly TTS service adapter.

Configure Amazon AWS Polly

The Amazon AWS Polly Text-to-Speech service is used to convert multilingual sutta text to speech. Furthermore, sutta text contains many Pali references that require SSML customization specific to AWS. To enable AWS Polly, you will need to configure your credentials

Login to your AWS account and go to the IAM dashboard|Delete your root access keys|Manage Security Credentials|Access Keys...|Create New Access Key

{
  "Bucket": "sc-voice-vsm",
  "s3": {
    "apiVersion": "2006-03-01",
    "endpoint": "https://s3.us-west-1.amazonaws.com",
    "region": "us-west-1"
  },
  "polly": {
    "region": "us-west-1",
    "signatureVersion": "v4",
    "apiVersion": "2016-06-10"
  },
  "sayAgain": {
    "Bucket": "say-again.sc-voice"
  },
  "region": "us-west-1",
  "secretAccessKey": "########################################",
  "accessKeyId": "####################"
}
aws configure
Launch localhost server
npm start

Open up localhost in your local browser and you will see Voice. When you are done with voice, type CTRL-C in the terminal.

Unit tests

npm run test

Unit tests take about 2 minutes. The unit tests require AWS Polly.

To execute a single unit/test, simply insert the text TESTTEST into the it("...") title argument. Then run npm run test:test, which selectively tests such unit tests whenever a source file changes. This makes quick work of debugging or implementing a feature.

Test failures
  • Some tests validate online APIs and may fail due to timeouts or EAI_AGAIN responses. Re-run tests and they should pass.
  • Some tests validate online content which may change. For example, the number of search results may change slightly. Update the unit tests accordingly and re-run tests.

Scripts

| Command line script | Description | | :----- | :---------- | | npm run test | Run service unit tests (about 2 minutes). | | npm run serve | Compile and reload SC-Voice Vue for development at http://localhost:8080 | | npm run build | Create production Vue build in dist folder | | npm run lint | Run esLint to check *.js and *.vue files `|

Other

Directory structure

  • src contains Javascript source code
  • test contains Javascript unit tests
  • scripts contains miscellaneous scripts
  • local contains local content not archived in git
  • public Vue/Vuetify public HTML assets
  • words contains language lexicons for search and speech.