gpt4 book ai didi

node.js - 在Google Assistant上播放特定时间的媒体对象

转载 作者:太空宇宙 更新时间:2023-11-04 00:02:35 26 4
gpt4 key购买 nike

有没有办法使用nodejs actions sdk 播放指定时间段的媒体对象?

例如在下面的代码中,文件的时长为 1 分 42 秒。但是假设我有一个 60 分钟长的文件,我希望能够将一个参数传递给对象来指定播放的持续时间,该持续时间将小于总持续时间。

function yourFunctionHandler(agent) {
let conv = agent.conv();
conv.ask(new SimpleResponse("Here is a funky Jazz tune"));
conv.ask(new Suggestions(['suggestion 1', 'suggestion 2']));
conv.close(new MediaObject({
name: 'Jazz in Paris',
url: 'https://storage.googleapis.com/automotive-media/Jazz_In_Paris.mp3',
description: 'A funky Jazz tune',
icon: new Image({
url: 'https://storage.googleapis.com/automotive-media/album_art.jpg',
alt: 'Media icon',
}),
})); }

最佳答案

不,目前无法将媒体响应的播放限制在有限的时间内、指定媒体中的起点或指定媒体中的终点。

关于node.js - 在Google Assistant上播放特定时间的媒体对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53951605/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com