IVONA Speech Cloud (SaaS)

TTS cloud services

IVONA Speech Cloud (SaaS) - API

By using the REST architecture (Representational State Transfer) and SOAP protocol (Simple Object Access Protocol) it is possible to create speech in IVONA Speech Cloud (SaaS) using any major programming language.
The large selection of available voices and speech parameters gives you ability to tailor recordings to your needs.

How does IVONA Speech Cloud (SaaS) work?

The IVONA Speech Cloud (SaaS) provides a set of methods for performing various operations related to speech synthesis. For example, it allows users to:

  • create voice-over recordings voicing services and devices,
  • get information about available voices and codecs,
  • modify pronunciation rules to improve text interpretation (e.g. foreign words, dialects).

Service access using REST is described in WADL (Web Application Description Language) document that could be found at http://api.ivona.com/saasapiwadl.xml. And for a complete list of available methods in SOAP compiled in the WSDL (Web Services Description Language) document, please visit http://api.ivona.com/saasapiwsdl.xml.

To build the speech-production function into your product, all you have to do is write a script which (using REST or SOAP) will be invoking methods enabling you to send text and generate speech files on the IVONA Speech Cloud (SaaS) server.

REST is a style of application architecture for distributed systems (like Web Services). It was created based on the experiences gathered during research on HTTP protocol and imposes the proper behavior of distributed systems components. SOAP is an international standard defined by the W3C organization used for exchange of data (saved as XML messages) between applications. The entire communication process is also run over the HTTP protocol.

How to start using the service?

IVONA Speech Cloud (SaaS) is available only to persons registered on our website. To begin using the API, you would need to create a user account at www.ivona.com. You will then have free access to a panel where you will be able to activate the 60-day Free Trial version of the service.

Speech production using REST

The speech production procedure is quick and easy, and usually requires only two POST requests to following resources:

  • tokens/ - for generation of token that will be used in the authorization process. Email used for the account registration on IVONA.com website is the only request parameter required.
  • speechfiles/ - for uploading the text to the website for conversion to speech, along with speech recording parameters (destination file format, selected voice, speed and volume, etc.). Along with the above parameters also the token generated in the first step and user's apikey checksum calculated using this token are sent for authorization purposes. In response, the method acquires the URL address of the audio file, which can then be downloaded by the user or made available using the IVONA hosting option.

Source code (PHP) with sample application:

Example
$baseUrl = 'http://api.ivona.com/api/saas/rest/';
$ch = curl_init();
curl_setopt_array($ch, array(CURLOPT_URL => $baseUrl.'tokens/', CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => 'email=test@ivona.com'));
$token = json_decode(curl_exec($ch));
curl_setopt_array($ch, array(CURLOPT_URL => $baseUrl.'speechfiles/', CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => 'token='.$token.'&md5='.md5(md5($password).$token).'&text='.urlencode('IVONA says hello!').'&contentType='.urlencode('text/plain').'&voiceId=gb_amy&codecId='.urlencode('mp3/22050')));
$speechFile = json_decode(curl_exec($ch));
curl_close($ch);
echo $speechFile->embedCode."<br/>".$speechFile->soundUrl;;

Speech production using SOAP

The speech production procedure is also very quick and easy, and requires only two invoking methods:

  • getToken() - used in the authorization process (the account created at ivona.com website).
  • createSpeechFile() - which uploads the text to the website for conversion to speech, along with speech recording parameters (destination file format, selected voice, speed and volume, etc.). In response, the method acquires the URL address of the audio file, which can then be downloaded by the user or made available using the IVONA hosting option.

Source code (PHP) with sample application:

Example
$soap = new SoapClient('http://api.ivona.com/saasapiwsdl.xml');
$token = $soap->__soapCall('getToken', array('email'=>'test@ivona.com'));
$speechFile = $soap->__soapCall('createSpeechFile', array('token'=>$token,
'md5'=>md5(md5($password).$token), 'text'=>'IVONA says hello!',
'contentType'=>'text/plain', 'voiceId'=>'gb_amy', 'codecId'=>'mp3/22050'));
echo $speechFile['embedCode']."<br/>".$speechFile['soundUrl'];

Sample IVONA Speech Cloud (SaaS) Implementations