Text to Speech Java Starter Application
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.
Building the application
Use Apache Maven to build the application.
$ mvn install
Deploying to Bluemix
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 Speechservice 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
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 Speechservice instance as described in Deploying to Bluemix steps 1-4.
bluemixUtilityto import configuration for the
Text to Speechservice.
$ ./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
Open Source @ IBM
Find more open source projects on the IBM Github Page.