简体   繁体   English

Google Actions 是否支持 SSML?

[英]Does Google Actions support SSML?

I can see on this page that Actions on Google does support SSML, however I'm having trouble getting it to work in my agent.我可以在此页面上看到 Actions on Google 确实支持 SSML,但是我无法让它在我的代理中工作。

I'm using DialogFlow with a PHP webhook.我将 DialogFlow 与 PHP webhook 一起使用。

To test it, my webhook is providing the following response via the 'speech' parameter:为了测试它,我的 webhook 通过 'speech' 参数提供以下响应:

<speak>First sentence. <break time="1s"/> Second sentence. <prosody pitch="+5st">and now high pitched</prosody></speak>

Testing this via Google Assistant on my Samsung S8, it is read in the male voice (this is the setting for my Action in Actions on Google).在我的三星 S8 上通过谷歌助手测试这个,它是用男声朗读的(这是我的 Action in Actions on Google 的设置)。 The break is not displayed in text and is ignored by the speech engine.中断不显示在文本中并且被语音引擎忽略。 The prosody tag appears in text and is also ignored by the speech engine.韵律标签出现在文本中,也会被语音引擎忽略。

Trying this same output in the Actions on Google audio simulator does correctly interpret the SSML tags.在 Actions on Google 音频模拟器中尝试相同的输出确实可以正确解释 SSML 标签。

Am I doing something obviously wrong, or are these tags perhaps not supported?我是否在做明显错误的事情,或者这些标签可能不受支持?

Actions on Google supports SSML and supports all three of the tags that you're using. Actions on Google支持 SSML并支持您使用的所有三个标签。

That the simulator generates the speech correctly is a pretty good sign that you're both doing things correctly and that the tags are supported.模拟器正确生成语音是一个很好的迹象,表明你们都在正确地做事并且支持标签。

From the description, it more sounds like an error with the Samsung or the Assistant on the Samsung than anything else.从描述来看,这听起来更像是三星或三星助手的错误,而不是其他任何东西。

I found this strange behavior (January 2021): When i test my project as "Smart Display" on the Actions Console, everything works perfect.我发现了这种奇怪的行为(2021 年 1 月):当我在操作控制台上将我的项目作为“智能显示”进行测试时,一切正常。 But when i change to the "Phone", some of my actions are not spoken, though shown on the simulator-display.但是当我切换到“电话”时,虽然在模拟器显示器上显示了我的一些动作,但并没有说出来。 But testing the action directly on my Android smartphone, everything works smooth.但是直接在我的 Android 智能手机上测试动作,一切都很顺利。

As i pointed out at the beginning: this might be a small bug in the simulator.正如我在开始时指出的那样:这可能是模拟器中的一个小错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM