Google助手-识别音频片段并根据该音频采取措施 [英] Google assistant - Identify audio clip and take an action based on that

本文介绍了Google助手-识别音频片段并根据该音频采取措施的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建Google Assistant应用,以识别从另一台设备(电视,广播等)播放的音频片段,并根据该音频片段采取措施以播放另一音频片段,YouTube视频或在浏览器中打开网站。

I'm trying to build a Google Assistant app to identify an audio clip that's playing from another device (TV, Radio, etc..) and take an action based on that Audio clip to play another audio clip, YouTube video or open a website in a browser.

很高兴知道实现此功能的可能性以及是否有可用的Google资源/文章。

It will be great to know the possibility of implementing this feature and if there is any available Google resource/ Article that I can use.

谢谢

推荐答案

很抱歉通知您目前,您无法访问与助手进行交互的原始记录。您只会得到用户的话语字符串。这意味着您无法制定识别音频剪辑的动作,只能在其中使用字符串(假设语音转文本引擎可以理解它们)

I'm sorry to inform you that as of now, you do not get access to the raw recordings of interactions with the Assistant. You only get the string of user's utterance. This means that you can't develop an action that identifies audio clips, you can only use strings in them (assuming that speech-to-text engine can understand them)

即使您使用字符串,也无法基于 ANY 输入打开网站或YouTube应用。因为与助手的交互是语音优先的。这意味着您不能总是假设用户有屏幕或已安装YouTube应用。如果互动是通过启用了助手的智能扬声器进行的?

You also can't open a website or YouTube app based on ANY input, even if you use strings. Because the interactions with the Assistant are voice-first. Meaning that you can't always assume that the user has a screen or has the YouTube app installed. What if the interaction is taking place through an Assistant-enabled smart speaker?

但是,您可以通过向用户播放用户的声音(或其他人的声音)将其录制在单独的应用中,然后使用SSML语法或助手的媒体响应进行播放。 这是详细说明我的意思,并且可以实现。

You can however, play user's voice back to them (or someone else's voice) by recording it in a separate app and then using SSML syntax or Media Responses of the Assistant to play them. Here's a detailed article of what I mean and it can be implemented.

这篇关于Google助手-识别音频片段并根据该音频采取措施的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆