Giter Site home page Giter Site logo

lcsouzamenezes / speech-javascript-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from watson-developer-cloud/speech-javascript-sdk

0.0 0.0 0.0 30.41 MB

Library for using the IBM Watson Speech to Text and Text to Speech services in web browsers.

Home Page: https://watson-speech.mybluemix.net/

JavaScript 97.50% Shell 2.50%

speech-javascript-sdk's Introduction

IBM Watson Speech Services for Web Browsers

Build Status npm-version

Allows you to easily add voice recognition and synthesis to any web app with minimal code.

Built for Browsers

This library is primarily intended for use in web browsers. Check out ibm-watson to use Watson services (speech and others) from Node.js.

However, a server-side component is required to generate auth tokens. The examples/ folder includes example Node.js and Python servers, and SDKs are available for Node.js, Java, Python, and there is also a REST API.

Installation - standalone

Pre-compiled bundles are available from on GitHub Releases - just download the file and drop it into your website: https://github.com/watson-developer-cloud/speech-javascript-sdk/releases

Installation - bower

bower install --save watson-speech

Installation - npm with Browserify or Webpack

This library can be bundled with browserify or Webpack and easy included in larger projects:

npm install --save watson-speech

This method enables a smaller bundle by only including the desired components, for example:

var recognizeMic = require('watson-speech/speech-to-text/recognize-microphone');

Using with IAM

This SDK CAN be used in the browser with services that use IAM for authentication. This does require a server-side component - an endpoint used to retrieve the token. An example can be found here.

In a local environment you should set only the TEXT_TO_SPEECH_IAM_APIKEY and SPEECH_TO_TEXT_IAM_APIKEY in your .env file, see example file here.

Once that is set up, the token can be used in your SDK request with the parameter access_token. See this example.

Using with Angular

Make sure polyfills.ts has following entries:

(window as any).global = window;
(window as any).process = require('process/browser');
import 'zone.js/dist/zone';  // Included with Angular CLI.
global.Buffer = global.Buffer || require('buffer').Buffer;

Changes

See CHANGELOG.md for a complete list of changes.

Development

Use examples for development

The provided examples can be used to test developmental code in action:

  • cd examples/
  • npm run dev

This will build the local code, move the new bundle into the examples/ directory, and start a new server at localhost:3000 where the examples will be running.

Note: This requires valid service credentials.

Testing

The test suite is broken up into offline unit tests and integration tests that test against actual service instances.

  • npm test will run the linter and the offline tests
  • npm run test-offline will run the offline tests
  • npm run test-integration will run the integration tests

To run the integration tests, service credentials are required. Make sure you have a valid .env file in the root directory.

speech-javascript-sdk's People

Contributors

apaparazzi0329 avatar bobfang avatar demiand avatar dependabot[bot] avatar dpopp07 avatar germanattanasio avatar hkomine avatar jeancarl avatar jmeis avatar kant avatar kushan-chinthaka avatar mediumtaj avatar mingzhi22 avatar mreinstein avatar nfriedly avatar nhayashida avatar nylki avatar playground avatar ricardojudo avatar rizwan29 avatar sirspidey avatar thomas-pfeiffer avatar w0o avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.