Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

watson-developer-cloud/text-to-speech-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

DEPRECATED: this repo is no longer actively maintained

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published