Use the Node.js and React components to create a web application that produces human-like sound from text. The application uses IBM® Watson’s ™ Text-to-Speech feature to provide a selection of sounds for multiple languages and genders. Watson Text to Speech is available in IBM Cloud and with the Watson API suite in IBM Cloud Pak ™ for Data.
Built with React components and a Node.js server, the text-to-speech web application takes the text input and sends it to Watson Text to Speech for speaking with the voice of your choice. There are several voices (male and female) available that cover many languages and regions.
You can process audio by adding SSML elements to the input text. SSML can be used to control timing, expressiveness, pitch, breath, speed, pronunciation, and more.
This app is designed to get you started. The text-to-speech application is a fun example, but the real results happen when you use this code to give voice to your own application.
Watson Text to Speech is available in IBM Cloud and with the Watson API suite in IBM Cloud Pak for Data. With the IBM Cloud Pak for Data, you can organize Watson text-to-speech on your own private cloud or anywhere Red Hat OpenShift works.
Once you’ve completed this code template, you’ll understand how to:
- Download and play audio from Watson Text to Speech using the REST API
- Integrate the Watson Text to Speech service into a web application
- Use React components and the Node.js server
- The user provides the text as input to the application (running locally, in IBM Cloud, or in IBM Cloud Pak for Data).
- The application sends the text to speech service.
- When the data is processed, the text-to-speech service returns the audio data to the HTML5 audio element for playback.
You will find the detailed steps of this model readme file. The steps show how to:
- Provide Watson’s text-to-speech service.
- Enable the server.
- Use a web application.