DEPRECATED: this repo is no longer actively maintained. It can still be used as reference, but may contain outdated or unpatched code.
The IBM Watson Text to Speech service is designed for streaming, low latency, synthesis of audio from text. It is the inverse of the automatic speech recognition. The TTS service can be accessed via a REST interface or directly via TCP.
Give it a try! Click the button below to fork into IBM DevOps Services and deploy your own copy of this application on Bluemix.
Use Apache Maven to build the application.
$ mvn install
-
Create a Bluemix Account
Sign up in Bluemix, or use an existing account. Watson Services in Beta are free to use.
-
Download and install the Cloud-foundry CLI tool
-
Connect to Bluemix in the command line tool.
$ cf login -a https://api.ng.bluemix.net
- Create the
Text to Speech
service in Bluemix.
$ cf create-service text_to_speech standard text-to-speech-service
-
Deploy the application. Ensure the
<application-name>
is something unique.
$ cf push <application-name> -p target/text-to-speech-1.0-SNAPSHOT.war
Once deployed, the application will be available at http://<application-name>.mybluemix.net
.
The application uses WebSphere Liberty as its server. Liberty provides the bluemixUtility command line client that makes it easy for applications to use certain Bluemix services.
-
Initialize Liberty server for the application. Maven will automatically download and install WebSphere Liberty.
$ mvn liberty:create-server
-
Log in to Bluemix and create
Text to Speech
service instance as described in Deploying to Bluemix steps 1-4. -
Use
bluemixUtility
to import configuration for theText to Speech
service.
$ ./target/wlp/bin/bluemixUtility import text-to-speech-service
- Bind the imported configuration to Liberty server.
$ ./target/wlp/bin/bluemixUtility bind defaultServer text-to-speech-service
-
Start the application.
$ mvn liberty:run-server
Once started, the application will be available at http://localhost:9080/text2speech.
To troubleshoot your Bluemix application, the most useful source of information is the log files. To see them, run the following command:
$ cf logs <application-name> --recent
This sample code is licensed under Apache 2.0. Full license text is available in LICENSE. The sample uses jQuery which is licensed under MIT
See CONTRIBUTING.
Find more open source projects on the IBM Github Page.