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

voiceplay

v0.3.11

Published

Voiceplay is an experimental method of controlling your airplay-connected devices by voice via the Amazon Echo, enabling you to search for and control content from YouTube and your iTunes media library and play it directly on your TV.

Downloads

4

Readme

README

Voiceplay is an experimental method of controlling your airplay-connected devices by voice via the Amazon Echo, enabling you to search for and control content from YouTube and your iTunes media library and play it directly on your TV.

Voiceplay is comprised of a node-based server that runs on your local network and two AWS Lambda functions that redirect your voice queries to your home media server. The voiceplayer server communicates with auto-discovered airplay-compatible devices, like an Apple TV. It leverages NaturalNode's naïve Bayes classifier to infer commands based upon natural language.

What can I say

'intents.js' will give you a better idea of what can be said to the Echo. Here are some examples:

  • Ask YouTube to play a music video by Michael Jackson
  • Ask YouTube to play a documentary about Carl Segan
  • Ask iTunes to play Star Trek
  • Ask iTunes give me more infor about this video
  • Launch this video on my mac.
  • Ask YouTube to play something else
  • Ask YouTube / iTunes what are we watching?
  • Ask YouTube / iTunes to pause / repeat / stop.

Requirements

  • Amazon Echo
  • Apple TV / Airplay receiver (tested on Apple TV 3 with Yosemite).
  • Node installed - https://nodejs.org/en/
  • Amazon Apps & Services Developer Account - https://developer.amazon.com/appsandservices
  • Amazon Web Services Account (for your Lambda redirect functions) - http://aws.amazon.com
  • YouTube API key via the Google Developers Portal (for searching YouTube) - https://console.developers.google.com

Setup

  • If you haven't already, install node.
  • With npm, install the latest version of voiceplay:
npm install voiceplay
  • Using Finder, Navigate to the folder where the voiceplay module is installed and open voiceplay.js with your editor of choice to specify its start arguments: your YouTube API key and the path to your iTunes directory.
server.configure({
  iTunesPath: '/Volumes/Media/iTunes/Home Videos/',           // iTunes media library path
  youtubeApiKey: 'AIzaSyDT6ebsYYqQGOY95izP1jtilUsrYdSKXIE',   // example YouTube API key
  port: 8080
});
  • Save the script and with terminal navigate to the directory where you installed the voiceplay module and run it:
node voiceplay
  • If successfully running, you will see:
Amazon Echo / Alexa Voice-Activated Airplay Media Server listening at http://192.168.0.12:8080 
Airplay device discovered: Apple TV.  Ready to start receiving requests from the AWS Lambda function.
  • Sign up or log in to the AWS Console and choose Lambda from the Services > All Services menu.
  • Create a Lambda function, skip the intro wizard, name this function 'YouTube' and paste the contents of 'lambda redirect.js'. A description isn't required.
  • Repeat the process for the iTunes media function, naming it iTunes (the names of these functions on the AWS portal isn't important). Take note of each function's ARN endpoint.
  • Seperate from AWS, log in to your Amazon Apps & services Developer Account and under Apps & Services, choose Alexa.
  • You will need to add two Alexa Skills - one for YouTube and the other for iTunes. Each skill has an associated name (youtube | itunes), invocation name (youtube | itunes), intent schema & sample utterances included here that must be specified in order for the functions to work.
  • For each skill, specify the ARN of the lambda functions created on the AWS console.

Notes