[英]How to play live audio stream using Google Actions Dialogflow
I have been trying to find a way to play live stream of audio (mp3) using Google Actions but haven't found a way to do so.我一直在尝试找到一种方法来使用 Google Actions 播放音频 (mp3) 的实时 stream,但还没有找到这样做的方法。
I tried Media Response as well but as mentioned in the documentation it doesn't support live stream.我也尝试了媒体响应,但如文档中所述,它不支持实时 stream。
I followed this thread but it doesn't have any examples to help me with.我关注了这个线程,但它没有任何示例可以帮助我。
Is it possible to play live mp3 stream using Google Actions?是否可以使用 Google Actions 播放实时 mp3 stream?
I've had relatively good results with the Media Player being able to handle mp3 "streams".媒体播放器能够处理 mp3“流”,我取得了相对较好的结果。 There are a couple of problems doing this, however:但是,这样做有几个问题:
If this is an issue, one alternative might be to use the Interactive Canvas (which uses Chrome on the device) to present an HTML page that has an <audio>
tag in it that you control.如果这是一个问题,一种替代方法可能是使用交互式 Canvas(在设备上使用 Chrome)呈现一个 HTML 页面,其中包含您控制的<audio>
标签。 This gives you a little more control (most streaming protocols are either supported or have JavaScript libraries that can do the work), but there are some downsides:这为您提供了更多控制权(大多数流协议要么受支持,要么具有可以完成工作的 JavaScript 库),但也有一些缺点:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.