http://b2b.jingpai.com/demo/demo11/
选择单词,可以发音,给一个类似http://dict.cn/做得

解决方案 »

  1.   

    var obj = new ActiveXObject( "SAPI.SpVoice" );
    obj.Speak( "show me the money", 0 );
      

  2.   

    varlj给个完整的页面代码,好吗,这样我看不明白~
      

  3.   

    不过这样的实现,在本地还好,放在网上是不大合适的,因为会有安全警告
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head>
    <body>
    <input type="text"  value="show me the money" id="txt"/>
    <button onclick="fun()">speak</button><script type="text/javascript">
    function fun()
    {
    var txt = document.getElementById("txt").value;
    var obj = new ActiveXObject( "SAPI.SpVoice" ); 
    obj.Speak( txt, 0 );
    }
    </script>
    </body>
    </html>
      

  4.   

    varlj,谢谢你,我大概看明白了。另外我想知道,obj.Speak是开始读,要停止是哪个函数?
      

  5.   

    new ActiveXObject( "SAPI.SpVoice" ); 
      

  6.   

    我的页面代码如下,我要实现当点击英文前的图片则朗读,再点击停止(或者鼠标经过是播放,离开是停止)。
    如果播放的是我自己的录音不知道能不能做到 。
    <body> 
    <table width="697" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
        <td width="697"><img src="img/audio.gif" width="13" height="14">The two most  important words in the English language are 
    “thank you.” Unfortunately, they are seldom heard. When was the last time you said “thank  you”? </td> 
      </tr> 
    </table> 
    </body> 
      

  7.   

    现在好多用的是FLASH去读....一般做好单词语音库就行了..
    至于语气语调嘛..那是比较难的.
      

  8.   

    有公司专门做这方面 的接口.你只需要付费买这个接口就行了.接口简单,你传一个句子过去.返回朗读的MP3文件. 你在客户端用FLASH播放即可.
      

  9.   

    mrshelly说的我不是很明白,能给个例子吗?