【发布时间】:2020-02-17 15:16:49
【问题描述】:
我正在研究 Google TTS,发现以下带有 par 标签的示例:
https://cloud.google.com/text-to-speech/docs/ssml#par
在示例中,音频构建正确。背景中有两个句子和一些声音。但是,如果您实际上将其与他们的 API 或控制台一起使用,则它不起作用。你只得到两句话,没有音频播放。链接到 TTS 控制台:
https://cloud.google.com/text-to-speech
这是我使用的 SSML:
<par>
<media xml:id="question" begin="0.5s">
<speak>Who invented the Internet?</speak>
</media>
<media xml:id="answer" begin="question.end+2.0s">
<speak>The Internet was invented by cats.</speak>
</media>
<media begin="answer.end-0.2s" soundLevel="-6dB">
<audio
src="https://actions.google.com/sounds/v1/cartoon/cartoon_boing.ogg"/>
</media>
<media repeatCount="3" soundLevel="+2.28dB"
fadeInDur="2s" fadeOutDur="0.2s">
<audio
src="https://actions.google.com/sounds/v1/animals/cat_purr_close.ogg"/>
</media>
</par>
我做错了什么?还是 TTS 服务本身有问题?
【问题讨论】:
标签: actions-on-google google-text-to-speech