Click here to Skip to main content
15,909,591 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello there
I want to use google text to speech in my own web site but I dont know how I do.
I search in Google Translate for code but those codes didn't help me.

I don know php please help me by javascript , asp.net , html , jquery , ...

Please help me.
Posted

hey you can do it using vbscript in your project.

just copy the below code in notepad and save it using .vbs extension and double click it
VB
 Set Sapi = Wscript.CreateObject("SAPI.SpVoice") 
                
Sapi.speak "WelCome "


You can use this in out project and pass parameter to speak.. :)
 
Share this answer
 
Comments
barbodsoft 20-Feb-13 2:49am    
But I want do it by google. cause that qualify is better.
and I don't know vbscript. please write your code in a html code to I understand it.
ssd_coolguy 20-Feb-13 5:28am    
see my another solution 3
please someone help me.

I need it very much.
 
Share this answer
 
see the below html code which takes input from user to speak:-

HTML
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
var VoiceObj = new ActiveXObject("Sapi.SpVoice");
function SpeakText() 
{
var tospeak = document.frmMain.txtDescription.value;
VoiceObj.Speak( tospeak  );
}
SpeakText()
</SCRIPT>
</HEAD>
<form name="frmMain">
<BODY>
<p align="CENTER"><br>
<input type="text" name="txtDescription" maxlength="30" >
<input onclick="SpeakText();" type="button" value="SpeakText">
</br></p>
</BODY>
</form>
</HTML>
 
Share this answer
 
v2
Comments
barbodsoft 20-Feb-13 6:50am    
no things are happen!!
barbodsoft 21-Feb-13 3:07am    
it has a error "TypeError: VoiceObj is undefined
"
barbodsoft 4-Jun-13 12:41pm    
but it don't do anythings. please hlep me!
that code does not work. please help me. I need your help
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900