谷歌文本在我们自己的网站上发表演讲 [英] google text to speech in our own web site

查看:122
本文介绍了谷歌文本在我们自己的网站上发表演讲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好吗

我想在我自己的网站上使用谷歌文本语音,但我不知道我是怎么做的。

我在谷歌翻译中搜索代码,但那些代码对我没有帮助。



我不知道php请用javascript帮助我,asp.net,html,jquery,...



请帮助我。

解决方案

嘿你可以在你的项目中使用vbscript来实现它。



只需在记事本中复制以下代码并使用.vbs扩展名保存并双击它

 设置 Sapi = Wscript.CreateObject(  SAPI.SpVoice

Sapi.speak WelCome





你可以在out项目中使用它并传递参数来说话..:)


请有人帮帮我。



我非常需要它。


看下面的html代码它接受我们的意见呃说的话: -



 <   HTML  >  
< HEAD >
< SCRIPT LANGUAGE = JavaScript >
var VoiceObj = new ActiveXObject( Sapi.SpVoice);
function SpeakText()
{
var tospeak = 文档 .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 >
< / 表格 >
< / HTML >


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.

解决方案

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

 Set Sapi = Wscript.CreateObject("SAPI.SpVoice") 
                
Sapi.speak "WelCome "



You can use this in out project and pass parameter to speak.. :)


please someone help me.

I need it very much.


see the below html code which takes input from user to speak:-

<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>


这篇关于谷歌文本在我们自己的网站上发表演讲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆