Home

Here you can see a sample voice reproduction script in ActionScript3:


function onIOError(event:IOErrorEvent):void {
// dont do any error message.
}
var sound:Sound;
var channel:SoundChannel;
var mytext=“Hello world”;
var url:String = “http://www.by-voice.com/ttsonline/get_speak_3scale.php?account=your3scalekey&voice=jennifer&format=mp3&text=”+mytext;
var urlRequest:URLRequest = new URLRequest(url);
sound = new Sound();
sound.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
sound.load(urlRequest);
sound.play();

Note that anyone knowing your account id would be able to get access to the service in your name, so using a flash movie  mechanism is not a secure way of accessing the service

A sample of Speech File generation in PHP:


<?php
Header("Content-Type: audio/*");
Header("Cache-Control: public");
$name=$GET["name"];
readfile("http://www.by-voice.com/ttsonline/get_speak3scale.php?account=your3scalekey&voice=jennifer&format=mp3&text=hello $name , welcome to 3scale website");  
}
?>

For example it could ba a file named hello.php and you would load it from a flash movie using the previous as3 script but loading the url http://yourserver.com/hello.php?name=Bill instead on the sound.load call.

Note that you only need real time speech generation for some types of speech messages. You can load a speech file using php or other server script (or directly puting the address on browser) and save it in your server. Later you could load it many times  without accessing to our server (from your server).

If you need a more sophisticated access control in flash movies or other types of real time speech generation from the browser, you can contact us by our contact email.

If you need a hosting service for your automatically generated Speech Files you can contact us.

If you want to use byv files , reproduced with By Voice Player, contact us for more information.