[英]Why I am facing some problem with voice RSS api
I am using Voice RSS api for text to speech, I am facing some problems with this api 我正在使用语音RSS API进行文本到语音的转换,此API面临一些问题
When try to say Hi or Hello in microphone it works on fine , but with other sentence it dose not reply 当尝试在麦克风中说“嗨”或“你好”时,它可以正常工作,但与其他句子相比,它没有答复
if( itsValue == 'what is your name' || itsValue == 'may I have your name' || itsValue == 'how may I address you' || itsValue == 'who are you' || itsValue == 'may I know your name' || itsValue == 'how can I call you'){
alert('df')
var text = encodeURIComponent("Opening...please wait");
document.getElementById("voiceresult").setAttribute("src", audioUrl+text);
document.getElementById("voiceresult").play();
}
Here's why the error happens: raw.githubusercontent.com
is serving your JavaScript file as plaintext ( text/plain
instead of application/javascript
). 这是发生错误的原因:
raw.githubusercontent.com
将JavaScript文件作为纯文本( text/plain
而不是application/javascript
)提供。 Your browser have strict MIME type checking enabled, so it throws an error, because it asks for some JavaScript but receives what appears to be plaintext. 您的浏览器已启用严格的MIME类型检查,因此会引发错误,因为它要求使用一些JavaScript,但收到的内容似乎是纯文本。
Unfortunately, you don't have any control over raw.githubusercontent.com
, so you have two solutions: 不幸的是,您对
raw.githubusercontent.com
没有任何控制权,因此有两种解决方案:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.