Monthly Archives: October 2006

TTS Service updated

We have updated the TTS Service tool shipped with ActiveTTS componet.

The service is a mini-http server that can handle the custom http request for TTS function under IIS.

The new features include:

List the installed voices

Convert text to audio file with given voice index

 

If you are interested in the source code of TTS Service, please email us.

 

Convert html to image at a given size

You may want to convert html to image. And you want to specify the size of the output image.

Here is the way when you use our awarding winning component htmlsnapshot. The demo is coded with VBscript.

‘demo how to convert html to image

Dim snap

‘Create the Html Snapshot Object
Set snap = CreateObject(“HTMLSNAP2.HtmlSnap.1″)

‘Set the time to wait for web page loading
snap.SetTimeOut CLng(200000)

‘You can control JPEG compression quality here
snap.SetJPEGQuality 100

‘Get the cookie
‘MsgBox snap.GetCookie2(“http://www.google.com/“)

‘Set the browser window size
snap.SetSnapDimension 500, 500

‘Set this if you want the image size exactly to be 1000,1000
snap.EnableSnapDimensionAsImageSize 1

‘Begin to capture the web page
snap.SnapUrl “http://www.google.com/“, “google.jpg”
‘Free object
Set snap = Nothing
The key methods are SetSnapDimension and EnableSnapDimensionAsImageSize

 

Record audio and upload

We add an upload method in audio record component.

Suppose  you are a website owner, you want to record your user’s voice and save to your server. Now you can do this with audio record component.

Your user can install the component on their machines, then they can record audio or speech, upload the audio. All these can be done in web browser.

We have provided a demo application in the latest release of Audio Record Component.

 

Speak with given voice with Active TTS

You may want to speak with a special voice when using ActiveTTS. It is easy to do this with any script languages. Here is an example in perl:

 The script first lists the voices installed on the machine. Then you can set the voice index to be used with speak or speakfile by setting the property VoiceIdx.

use Win32::OLE;
$tts = Win32::OLE->new(‘TTSObj.TextToSpeech.1′) or die “oopsn”;

$n = $tts->get_VoiceCount();
for($i = 0; $i < $n; $i++)
{
 $tts->{VoiceIdx} = $i;
 print “VoiceIdx:”.$i.” Name:”.$tts->{VoiceName}.”n”;
}

#Set to the voice you wish
$tts->{VoiceIdx} = 1;
$tts->Speak(“Hello world”, 0);

$tts->SpeakToFile(“Hello world”, “1.mp3″, 0);