Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Sat, 18 Mar 2006 07:11:27 -0800,    group: microsoft.public.inetsdk.programming.scripting.jscript        back       


Text to Speech using Java Script   
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 is : 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.
Code snippets are appreciable.

Regds,
Sreek
date: Sat, 18 Mar 2006 07:11:27 -0800   author:   sreek gupta

Re: Text to Speech using Java Script   
> Above script is failing at the following line :
> var VoiceObj = new ActiveXObject("Sapi.SpVoice");
>
> Error is : Automation Server cannot create object
>


Your problem is entirely IE browser security related when it comes to 
ActiveX components 'not marked as safe' which is a per zone setting and a 
per end user choice.

A trusted host environment like WSH or HTA is a better design choice for 
your solution.


> 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.
> Code snippets are appreciable.
>
> Regds,
> Sreek

-- 
Michael Harris
Microsoft MVP Scripting
date: Sat, 18 Mar 2006 08:57:11 -0800   author:   Michael Harris \(MVP\) mikhar at mvps dot org

Re: Text to Speech using Java Script   
Hi Michael,
Thanks for your reply.
Can you please elobarate the following lines. I am unable to understand.
I mean how to achieve the following design.

>A trusted host environment like WSH or HTA is a better design choice for 
> your solution.

Also do you want me to change 'not marked as safe' settings to Enable in IE 
? or how should be the settings in IE?

Regds,
Sreek
"Michael Harris (MVP)" wrote:

> > Above script is failing at the following line :
> > var VoiceObj = new ActiveXObject("Sapi.SpVoice");
> >
> > Error is : Automation Server cannot create object
> >
> 
> 
> Your problem is entirely IE browser security related when it comes to 
> ActiveX components 'not marked as safe' which is a per zone setting and a 
> per end user choice.
> 
> A trusted host environment like WSH or HTA is a better design choice for 
> your solution.
> 
> 
> > 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.
> > Code snippets are appreciable.
> >
> > Regds,
> > Sreek
> 
> -- 
> Michael Harris
> Microsoft MVP Scripting
> 
> 
>
date: Sat, 18 Mar 2006 23:54:09 -0800   author:   sreek gupta

Re: Text to Speech using Java Script   
Hi Michel,
I need this text to speech functionality in my JSP pages as well. In that 
case does HTA works ?
My actual functionality could be as follows:
1. My web page should talk .
2. Alerts of my web page should talk.
Most of the files are JSP pages. So please suggest me how can i achieve Text 
to Speech in JSP.

I have tried saving my code with .hta extension and double clicked on it. I 
am able to hear the voice. But same code i have saved as .hta in my personal 
PC at home. And i doubled clicked on it. I couldnt hear the voice. Why is it 
working in one machine and not working in another machine. Both are same 
Windows XP machines.

Regds,
Sreek

"sreek gupta" wrote:

> Hi Michael,
> Thanks for your reply.
> Can you please elobarate the following lines. I am unable to understand.
> I mean how to achieve the following design.
> 
> >A trusted host environment like WSH or HTA is a better design choice for 
> > your solution.
> 
> Also do you want me to change 'not marked as safe' settings to Enable in IE 
> ? or how should be the settings in IE?
> 
> Regds,
> Sreek
> "Michael Harris (MVP)" wrote:
> 
> > > Above script is failing at the following line :
> > > var VoiceObj = new ActiveXObject("Sapi.SpVoice");
> > >
> > > Error is : Automation Server cannot create object
> > >
> > 
> > 
> > Your problem is entirely IE browser security related when it comes to 
> > ActiveX components 'not marked as safe' which is a per zone setting and a 
> > per end user choice.
> > 
> > A trusted host environment like WSH or HTA is a better design choice for 
> > your solution.
> > 
> > 
> > > 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.
> > > Code snippets are appreciable.
> > >
> > > Regds,
> > > Sreek
> > 
> > -- 
> > Michael Harris
> > Microsoft MVP Scripting
> > 
> > 
> >
date: Sun, 19 Mar 2006 03:28:26 -0800   author:   sreek gupta

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us