You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-15
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Allows you to easily add voice recognition and synthesis to any web app with min
10
10
11
11
This 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.
12
12
13
-
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](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), and there is also a [REST API](https://cloud.ibm.com/docs/services/watson?topic=watson-gs-tokens-watson-tokens).
13
+
However, 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.
14
14
15
15
### Installation - standalone
16
16
@@ -37,11 +37,11 @@ var recognizeMic = require('watson-speech/speech-to-text/recognize-microphone');
37
37
38
38
## Using with IAM
39
39
40
-
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](https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/master/examples/server.js#L92).
40
+
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.
41
41
42
-
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](https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/master/examples/.env.example).
42
+
In a local environment you should set only the `TEXT_TO_SPEECH_IAM_APIKEY` and `SPEECH_TO_TEXT_IAM_APIKEY` in your `.env` file.
43
43
44
-
Once that is set up, the token can be used in your SDK request with the parameter `access_token`. See [this example](https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/master/examples/static/microphone-streaming.html#L36).
44
+
Once that is set up, the token can be used in your SDK request with the parameter `access_token`.
45
45
46
46
## Using with Angular
47
47
@@ -64,17 +64,6 @@ See [CHANGELOG.md](CHANGELOG.md) for a complete list of changes.
64
64
65
65
Unfortunately, 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.
66
66
67
-
### Use examples for development
68
-
69
-
The provided examples can be used to test developmental code in action:
70
-
71
-
-`cd examples/`
72
-
-`npm run dev`
73
-
74
-
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.
75
-
76
-
Note: This requires valid service credentials.
77
-
78
67
### Testing
79
68
80
69
The test suite is broken up into offline unit tests and integration tests that test against actual service instances.
Copy file name to clipboardExpand all lines: docs/README.md
-7
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,4 @@
2
2
3
3
The basic API is outlined below, see complete API docs at http://watson-developer-cloud.github.io/speech-javascript-sdk/master/
4
4
5
-
See several basic examples at http://watson-speech.mybluemix.net/ ([source](https://github.com/watson-developer-cloud/speech-javascript-sdk/tree/master/examples/))
6
-
7
-
See a more advanced example at https://speech-to-text-demo.mybluemix.net/
8
-
9
5
All API methods require an auth token that must be [generated server-side](https://github.com/watson-developer-cloud/node-sdk#authorization).
10
-
(See https://github.com/watson-developer-cloud/speech-javascript-sdk/tree/master/examples/ for a couple of basic examples in Node.js and Python.)
11
-
12
-
_NOTE_: The `token` parameter only works for CF instances of services. For RC services using IAM for authentication, the `accessToken` parameter must be used.
0 commit comments