This folder has example Node.js and Python servers to generate auth tokens and
several html files (in static/) with different examples of using the Speech SDK.
There are also a few audio files to test with in the static/ folder.
- IBM Watson Speech to Text service credentials - see http://www.ibm.com/watson/developercloud/doc/getting_started/gs-credentials.shtml
- Node.js OR Python
cdinto theexamples/directory and runnpm installto grab dependencies- edit
tts-token.jsandstt-token.jsto include your service credentials (or create a.envfile) - run
npm start - Open your browser to http://localhost:3000/ to see the examples.
cdinto theexamples/directory and runpip install watson_developer_cloud flask(oreasy_install...) to grab dependencies- edit
server.pyto include your service credentials (or create a.envfile) - run
python server.py - Open your browser to http://localhost:5000/ to see the examples.
- The examples all use fetch (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.
- 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,
Java,
Python,
and there is a REST API
for use with other languages (or
curl). - The Speech SDK may be used in browserify or as a standalone library; all of the current examples use it as a standalone library for simplicity.