Speech to Text Browser Application
The Speech to Text service uses IBM's speech recognition capabilities to convert speech in multiple languages into text. The transcription of incoming audio is continuously sent back to the client with minimal delay, and it is corrected as more speech is heard. The service is accessed via a WebSocket interface; a REST HTTP interface is also available;
Node.js is also used to provide the browser client's authentication token.
You need a Bluemix account. If you don't have one, sign up.
Download and install the Cloud-foundry CLI tool if you haven't already.
manifest.ymlfile and change
<application-name>to something unique. The name you use determines the URL of your application. For example,
applications: - services: - my-service-instance name: <application-name> command: npm start path: . memory: 512M
- Connect to Bluemix with the command line tool.
cf api https://api.ng.bluemix.net cf login
- Create and retrieve service keys to access the Speech to Text service:
cf create-service speech_to_text standard my-stt-service cf create-service-key my-stt-service myKey cf service-key my-stt-service myKey
- Create a
.envfile in the root directory by copying the sample
.env.examplefile using the following command:
cp .env.example .env
You will update the
.env with the information you retrieved in steps 5.
.env file will look something like the following:
- Install the dependencies you application need:
- Start the application locally:
Point your browser to http://localhost:3000.
Optional: Push the application to Bluemix:
After completing the steps above, you are ready to test your application. Start a browser and enter the URL of your application.
<your application name>.mybluemix.net
For more details about developing applications that use Watson Developer Cloud services in Bluemix, see Getting started with Watson Developer Cloud and Bluemix.
The main source of troubleshooting and recovery information is the Bluemix log. To view the log, run the following command:
cf logs <application-name> --recent
For more details about the service, see the documentation for the Speech to Text service.
. ├── app.js // express routes ├── config // express configuration │ ├── express.js │ └── security.js ├── manifest.yml ├── package.json ├── public // static resources ├── server.js // entry point ├── test // tests └── views // react components
This sample code is licensed under Apache 2.0.
Open Source @ IBM
Find more open source projects on the IBM Github Page
Sample web applications that include this package may be configured to track deployments to IBM Bluemix and other Cloud Foundry platforms. The following information is sent to a Deployment Tracker service on each deployment:
- Node.js package version
- Node.js repository URL
- Application Name (
- Space ID (
- Application Version (
- Application URIs (
- Labels of bound services
- Number of instances for each bound service and associated plan information
This data is collected from the
package.json file in the sample application and the
VCAP_SERVICES environment variables in IBM Bluemix and other Cloud Foundry platforms. This data is used by IBM to track metrics around deployments of sample applications to IBM Bluemix to measure the usefulness of our examples, so that we can continuously improve the content we offer to you. Only deployments of sample applications that include code to ping the Deployment Tracker service will be tracked.