{"id":13801040,"url":"https://github.com/watson-developer-cloud/speech-javascript-sdk","last_synced_at":"2025-04-12T15:41:46.358Z","repository":{"id":3497827,"uuid":"49778183","full_name":"watson-developer-cloud/speech-javascript-sdk","owner":"watson-developer-cloud","description":"Library for using the IBM Watson Speech to Text and Text to Speech services in web browsers.","archived":false,"fork":false,"pushed_at":"2023-06-15T17:54:06.000Z","size":32655,"stargazers_count":261,"open_issues_count":15,"forks_count":133,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-03T18:12:24.103Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://watson-speech.mybluemix.net/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/watson-developer-cloud.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-01-16T15:12:04.000Z","updated_at":"2024-11-14T20:12:45.000Z","dependencies_parsed_at":"2023-02-17T10:30:21.726Z","dependency_job_id":null,"html_url":"https://github.com/watson-developer-cloud/speech-javascript-sdk","commit_stats":{"total_commits":493,"total_committers":32,"mean_commits":15.40625,"dds":0.2900608519269777,"last_synced_commit":"fcd563a51a1a4da15867c19b682a38527df84bf1"},"previous_names":[],"tags_count":107,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fspeech-javascript-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fspeech-javascript-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fspeech-javascript-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fspeech-javascript-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/watson-developer-cloud","download_url":"https://codeload.github.com/watson-developer-cloud/speech-javascript-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590875,"owners_count":21129904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:18.903Z","updated_at":"2025-04-12T15:41:46.337Z","avatar_url":"https://github.com/watson-developer-cloud.png","language":"JavaScript","funding_links":[],"categories":["Data \u0026 AI"],"sub_categories":[],"readme":"![](docs/js-sdk.png)\nIBM Watson Speech Services for Web Browsers\n\n[![Build Status](https://travis-ci.org/watson-developer-cloud/speech-javascript-sdk.svg?branch=master)](https://travis-ci.org/watson-developer-cloud/speech-javascript-sdk)\n[![npm-version](https://img.shields.io/npm/v/watson-speech.svg)](https://www.npmjs.com/package/watson-speech)\n\nAllows you to easily add voice recognition and synthesis to any web app with minimal code.\n\n### Built for Browsers\n\nThis library is primarily intended for use in web browsers. Check out [ibm-watson](https://www.npmjs.com/package/ibm-watson) to use Watson services (speech and others) from Node.js.\n\nHowever, a **server-side component is required to generate auth tokens**. SDKs are available for [Node.js](https://github.com/watson-developer-cloud/node-sdk#authorization), [Java](https://github.com/watson-developer-cloud/java-sdk), [Python](https://github.com/watson-developer-cloud/python-sdk/blob/master/examples/authorization_v1.py), which can be used with a server-side application.\n\n### Installation - standalone\n\nPre-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\n\n### Installation - bower\n\n```sh\nbower install --save watson-speech\n```\n\n### Installation - npm with Browserify or Webpack\n\nThis library can be bundled with [browserify](http://browserify.org/) or [Webpack](http://webpack.github.io/)\nand easy included in larger projects:\n\n    npm install --save watson-speech\n\nThis method enables a smaller bundle by only including the desired components, for example:\n\n```js\nvar recognizeMic = require('watson-speech/speech-to-text/recognize-microphone');\n```\n\n## Using with IAM\n\nThis 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.\n\nIn a local environment you should set only the `TEXT_TO_SPEECH_IAM_APIKEY` and `SPEECH_TO_TEXT_IAM_APIKEY` in your `.env` file.\n\nOnce that is set up, the token can be used in your SDK request with the parameter `access_token`.\n\n## Using with Angular\n\nMake sure `polyfills.ts` has following entries:\n\n```js\n(window as any).global = window;\n(window as any).process = require('process/browser');\nimport 'zone.js/dist/zone';  // Included with Angular CLI.\nglobal.Buffer = global.Buffer || require('buffer').Buffer;\n```\n\n## Changes\n\nSee [CHANGELOG.md](CHANGELOG.md) for a complete list of changes.\n\n## Development\n\n### Global Transaction ID\n\nUnfortunately, there is no way to set or get the global transaction id provided by the initial websocket handshake with the Speech service. This is due to limitations from the W3C Websocket API for browser. It is possible; however, to grab the `X-Global-Transaction-Id` header through a browser's dev tool \"Network\" tab. After making a call to the service, look for a request to the `v1/recognize` endpoint which should return a 101 code. The response headers from that request will contain the `X-Global-Transaction-Id` header.\n\n### Testing\n\nThe test suite is broken up into offline unit tests and integration tests that test against actual service instances.\n\n- `npm test` will run the linter and the offline tests\n- `npm run test-offline` will run the offline tests\n- `npm run test-integration` will run the integration tests\n\nTo run the integration tests, service credentials are required. Make sure you have a valid `.env` file in the root directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatson-developer-cloud%2Fspeech-javascript-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatson-developer-cloud%2Fspeech-javascript-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatson-developer-cloud%2Fspeech-javascript-sdk/lists"}