Using Google Text-To-Speech in Javascript

后端 未结 6 2047
一生所求
一生所求 2020-12-12 10:58

I need to play Google text-to-speech in JavaScript.
The idea is to use the web service:

http://translate.google.com/translate_t

6条回答
  •  春和景丽
    2020-12-12 11:10

    Here is the code snippet I found:

    var audio = new Audio();
    audio.src ='http://translate.google.com/translate_tts?ie=utf-8&tl=en&q=Hello%20World.';
    audio.play();
    

提交回复
热议问题