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
This folder has example Node.js and Python servers to generate auth tokens and
5
-
several html files (in `static/`) with different examples of using the Speech SDK.
4
+
This folder has example Node.js and Python servers to generate auth tokens and
5
+
several html files (in `static/`) with different examples of using the Speech SDK.
6
6
7
7
There are also a few audio files to test with in the `static/` folder.
8
8
9
9
10
10
Prerequisite
11
11
------------
12
12
13
-
* IBM Watson Speech to Text service credentials - see [Service credentials for Watson services](https://www.ibm.com/watson/developercloud/doc/common/getting-started-credentials.html)
13
+
* IBM Watson Speech to Text service credentials - see [Service credentials for Watson services](https://cloud.ibm.com/docs/services/watson?topic=watson-creating-credentials)
14
14
* Node.js OR Python
15
15
16
16
@@ -22,28 +22,15 @@ Setup - Node.js
22
22
3. run `npm start`
23
23
4. Open your browser to http://localhost:3000/ to see the examples.
24
24
25
-
26
-
Setup - Python
27
-
--------------
28
-
29
-
1.`cd` into the `examples/` directory and run `pip install watson_developer_cloud flask python-dotenv pyopenssl` (or `easy_install...`) to install python dependencies.
30
-
2. run `./scripts/postinstall.sh` to install client-side dependencies
31
-
3. edit `server.py` to include your service credentials (or create a `.env` file)
32
-
4. run `python server.py`
33
-
5. Open your browser to http://localhost:5000/ to see the examples.
34
-
35
-
36
25
Notes
37
26
-----
38
27
39
28
* The examples all use [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) (a modern promise-based replacement for XMLHttpRequest) to retrieve auth tokens. Most supported browsers include a native fetch implementation, but a pollyfill is included in the top-level module for older browsers.
40
-
* The examples use a Node.js server to generate tokens. It doesn't have to be written in Node.js, but *some server-side token generator is required*. The SDK will not accept your service credentials directly, and you can not use them to generate a token client-side. 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 a [REST API](https://www.ibm.com/watson/developercloud/doc/common/getting-started-tokens.html) for use with other languages (or `curl`).
29
+
* The examples use a Node.js server to generate tokens. It doesn't have to be written in Node.js, but *some server-side token generator is required*. The SDK will not accept your service credentials directly, and you can not use them to generate a token client-side. 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 a [REST API](https://cloud.ibm.com/docs/services/watson?topic=watson-gs-tokens-watson-tokens) for use with other languages (or `curl`).
41
30
* The Speech SDK may be used in browserify, Webpack, or as a standalone library. Most of the examples use the standalone version either installed via NPM or symlinked to the root directory when developing locally.
42
31
43
32
44
33
More Examples
45
34
-------------
46
35
47
-
* Speech to Text: [Demo](https://speech-to-text-demo.mybluemix.net/), [Code](https://github.com/watson-developer-cloud/speech-to-text-nodejs)
0 commit comments