您如何使用Google文本语音API说“ Hello World”?

时间:2019-06-15 18:26:05

标签: text-to-speech

我正在学习[Google Cloud Text-to-Speech][1]

以下作品:

var params = {}

params.type = 'get'
params.url = 'https://texttospeech.googleapis.com/v1/voices'
params.dataType = 'json'
params.data = {}
params.data.key = 'my api key goes here'
var promise = $.ajax(params)
promise.done(done)
promise.fail(fail)
function done(response) {
	console.log(response)
}
function fail(a,b,c) {
	console.log(a)
	console.log(b)
	console.log(c)
}

但是我不知道下一步该怎么做。我想做的是让浏览器说“ Hello World!”。我试图不在服务器上安装计算引擎,但我愿意做任何需要的事情。我正试图以尽可能小的占地面积做到这一点。

0 个答案:

没有答案