Skip to content
This repository has been archived by the owner. It is now read-only.
DEPRECATED: this repo is no longer actively maintained
Branch: master
Clone or download
Latest commit 3cd1602 Jul 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main Update the description to say its a Java SDK Oct 6, 2016
.gitignore Switch to Maven and use Java SDK for Watson services. May 5, 2016
CONTRIBUTING.md initial commit Feb 5, 2015
LICENSE initial commit Feb 5, 2015
NOTICE fixed #1 update sample app to use the GA version of Text to Speech Aug 2, 2015
README.md Update README.md Jul 15, 2019
manifest.yml
pom.xml Switch to Maven and use Java SDK for Watson services. May 5, 2016

README.md

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.

Deploy to Bluemix

Building the application

Use Apache Maven to build the application.

$ mvn install

Deploying to Bluemix

  1. Create a Bluemix Account

    Sign up in Bluemix, or use an existing account. Watson Services in Beta are free to use.

  2. Download and install the Cloud-foundry CLI tool

  3. Connect to Bluemix in the command line tool.

$ cf login -a https://api.ng.bluemix.net
  1. Create the Text to Speech service in Bluemix.
$ cf create-service text_to_speech standard text-to-speech-service
  1. Build the application.

  2. 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.

Running locally

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.

  1. Build the application.

  2. Initialize Liberty server for the application. Maven will automatically download and install WebSphere Liberty.

$ mvn liberty:create-server
  1. Log in to Bluemix and create Text to Speech service instance as described in Deploying to Bluemix steps 1-4.

  2. Use bluemixUtility to import configuration for the Text to Speech service.

$ ./target/wlp/bin/bluemixUtility import text-to-speech-service
  1. Bind the imported configuration to Liberty server.
$ ./target/wlp/bin/bluemixUtility bind defaultServer text-to-speech-service
  1. Start the application.

    $ mvn liberty:run-server

    Once started, the application will be available at http://localhost:9080/text2speech.

Troubleshooting

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

License

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

Contributing

See CONTRIBUTING.

Open Source @ IBM

Find more open source projects on the IBM Github Page.

You can’t perform that action at this time.