Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

silent-echo-sdk

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

silent-echo-sdk

[![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

  • 0.3.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

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.

FAQs

Package last updated on 15 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc