Google文字转语音始终显示404(未找到)

时间:2014-09-23 13:11:40

标签: html audio text-to-speech moodle

我正在使用moodle开发网站。我需要使用Text to Speech所以我使用Google TTS,而SimpleSpeak也不能使用moodle 2.7。

所以在我的页面中我有类似的东西:

<audio id="live" src="http://translate.google.com/translate_tts?tl=en&amp;q=live"      
rel="noreferrer”>
</audio>
<div> 
<button onclick="document.getElementById('live').play()" &gt;play=""> 
live
</button> 
</div>

但每次我点击按钮它都不起作用,当我检查代码时,它给出了 无法加载资源:服务器响应状态为404(未找到)

我已经添加了rel =&#34; noreferrer&#34;。

任何人都可以帮我解决这个问题。谢谢你提前。

1 个答案:

答案 0 :(得分:0)

我刚刚注意到你的错误。在您的代码中,您有:

rel="noreferrer”

而不是

rel="noreferrer"

您不小心错误地引用了引号。

 ” =/= "