Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > Other Programming Languages
|
Other Programming Languages If you have a coding issue to discuss about another language that really isn't provided for in any other forum here (not ASP.NET C#, C++, VB, PHP, JavaScript, Python, Java, Perl, Applescript, XML or any of the other forum topics we have), post it here. Enough discussion on a language we don't have covered could prompt a new forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Other Programming Languages section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 18th, 2006, 11:33 AM
Registered User
 
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Text to Speech using Java Script on Windows XP

Hi ,
I have installed WINDOWS Xp on my machine. SAPI (Microsoft Speech API) is in built in WINDOWS Xp. I am trying to implement Text - To - Speech using a java script. But i couldnt succeed.

Following is the code snippet i am running.

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
var VoiceObj = new ActiveXObject("Sapi.SpVoice");
var my_test = "my test for you today is an amazing example";
function SpeakText() {
VoiceObj.Speak( my_test, 1 );
}
SpeakText()
</SCRIPT>
</HEAD>
</HTML>

Above script is failing at the following line :
var VoiceObj = new ActiveXObject("Sapi.SpVoice");

Error says 'Automation server cannot create object'

Can anyone tell me what is wrong with the above script. Do i need to install any other software on WINDOWS Xp to make Text - to - Speech work ?
Can anyone tell step by step procedure to implement Text - To - Speech on Windows XP machine using Java Script. And also what are the prerequisites for Text to Speech on Windows XP machine?
Code snippets are appreciable.

Regds,
Srikanth

Reply With Quote
  #2 (permalink)  
Old June 29th, 2006, 02:45 AM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to romansky
Default

Hi sreek_s, I am experiencing the same problem too, have you got the solutions? Thanks

Reply With Quote
  #3 (permalink)  
Old December 23rd, 2007, 01:05 PM
Registered User
 
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It worked for me. I am using IE7. Probably it is integrated with SAPI ?

Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract text with java script TheMajor Javascript 5 September 30th, 2007 09:45 PM
Quotes corrupts text-to-speech Gadget XSLT 2 March 21st, 2006 07:43 AM
Rich Text Editor in Java Script needed iniro Javascript 4 September 7th, 2004 04:50 AM
Rich Text Editor in Java Script needed iniro HTML Code Clinic 3 September 7th, 2004 03:54 AM
Help with Text-to-Speech vb_programmer Pro VB 6 0 September 24th, 2003 11:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.