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

silent-echo-sdk

v0.3.8

Published

[![CircleCI](https://circleci.com/gh/bespoken/silent-echo-sdk.svg?style=svg)](https://circleci.com/gh/bespoken/silent-echo-sdk) [![codecov](https://codecov.io/gh/bespoken/silent-echo-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/bespoken/silen

Downloads

5

Readme

CircleCI codecov npm

Silent Echo SDK

Use the Silent Echo SDK to build UIs and bots that interact with Alexa via text.

Check out our first example project to use it - SilentEchoBot!
Add SilentEcho to your Slack - try it here.

The SDK can be used via NodeJS or HTTP.

NodeJS SDK

Installation

Add the Silent Echo SDK to your project:

npm install silent-echo-sdk --save

Get your token:
https://silentecho.bespoken.io/link_account?token=true

Save the token that is generated - you will use it in the step below.

Sending a Message

Here is a simple example in Javascript:

const echoSDK = require("silent-echo-sdk");
const silentEcho = new echoSDK.SilentEcho("<PUT_YOUR_TOKEN_HERE>");
silentEcho.message(message).then((result) => {
    console.log("Reply Transcript: " + result.transcript);
    console.log("Reply Audio: " + result.transcript_audio_url);
});

Result Payload

Here is the full result payload:

export interface ISilentResult {
    card: ICard | null;
    debug?: {
        rawJSON: any;
    };
    sessionTimeout: number;
    streamURL: string | null;
    transcript: string;
    transcriptAudioURL: string;
}

export interface ICard {
    imageURL: string | null;
    mainTitle: string | null;
    subTitle: string | null;
    textField: string;
    type: string;
}

HTTP SDK

The SilentEcho service can also be called directly via HTTP.

Pre-Requisites

Get a SilentEcho Token:
https://silentecho.bespoken.io/link_account?token=true

Save the token - you will use it when call the HTTP interface.

Requests

The Base URL is:
https://silentecho.bespoken.io

  • /process
    • Method: GET
    • Parameters:
      • user_id: string - SilentEcho token
      • message: string - The message to send to Echo
      • debug: string [Optional] - If set, returns debug output
    • Response:

Example

HTTP Request:

https://silentecho.bespoken.io/process
    ?user_id=<TOKEN>
    &message=hello there

HTTP Response:

{
    "card": null,
    "sessionTimeout": 0,
    "streamURL": null,
    "transcript": "hi",
    "transcriptAudioURL": "https://storage.googleapis.com/raw_audio/7898e6fb-2d3d-4039-9b4a-00641fa1c249.mp3"
}

What's Next

  • Keep the session open longer for deep skill interactions
  • More bots. Lots of 'em.