JSonic consists of a server implementing a REST API for synthesizing speech utterances to web accessible files and client JavaScript that caches and plays speech and sound on demand. The current version implements the server using Tornado and the client using Dojo.
The following lists show all of the minimum requirements for both the server and client. You do not have to download all of these up-front; the remaining sections walk you through how to .
The server Python code has been tested with these minimum versions:
The client JS code requires:
To get the latest stable release of JSonic:
To get the latest development code:
Install git.
Clone the JSonic git repository:
git clone git://github.com/uncopenweb/jsonic.git
Install the prerequisites listed on the Tornado website.
Install the Tornado web server.
Install the iterpipes module.
Install the espeak text-to-speech engine.
Install LAME for MP3 encoding support.
Install the oggenc utility from Vorbis tools for OGG encoding support.
Start the JSonic server on port 8888 with 4 worker processes using the following command.
cd jsonic/server
python jsonic.py
To get a list of command line options, run the following command.
python jsonic.py --help
See the HTML files in the examples/ folder for complete applications satisfying these requirements. You can run the examples by visiting the http://yourdomain:8888/static/examples/ URL of the JSonic server if you start the server with the –static parameter.
Create a configuration object for JSonic.
var args = {jsonicURI : '/jsonic', defaultCaching : true};
Create an instance of the JSonic class
var js = new uow.audio.JSonic(args);
Invoke the JSonic.say method.
js.say({text : 'Hello world!'})