HTML5 speech input and Google Translate text-to-speech, problem in Chrome

后端 未结 2 1141
你的背包
你的背包 2021-01-23 03:40

I\'m creating a voice/text-memo web application. Here: http://gustavstromberg.se/sandbox/html5/localstorage/ look at its source (very short, most of it is css)

This is:

2条回答
  •  情书的邮戳
    2021-01-23 04:10

    It is because google restricts certain types of requests to prevent the service from being overloaded. So the audio file is not fetched when your browser tries to fetch it. Once you visit the translation link, the audio file is fetched and is cached which is why the playback works (provided the text-memo is same). This has been my observation but I'm not very sure.

    When I used CURL to fetch the file, this is what I got in response:


    403. That’s an error.

    Your client does not have permission to get URL /translate_tts?q=hello from this server.


提交回复
热议问题