python的实时音频传送_python – 使用Alexa传输音频的最简单示例
以下代码对我有用:def lambda_handler(event, context):return {"response": {"directives": [{"type": "AudioPlayer.Play","playBehavior": "REPLACE_ALL","audioItem": {"stream": {"token": "12345","url": "https://emit
以下代码对我有用:
def lambda_handler(event, context):
return {
"response": {
"directives": [
{
"type": "AudioPlayer.Play",
"playBehavior": "REPLACE_ALL",
"audioItem": {
"stream": {
"token": "12345",
"url": "https://emit-media-production.s3.amazonaws.com/pbs/the-afterglow/2016/08/24/1700/201608241700_the-afterglow_64.m4a",
"offsetInMilliseconds": 0
}
}
}
],
"shouldEndSession": True
}
}
]
唯一的区别是URL是https而不是http.
如果它在技能模拟器中不起作用,请不要被推迟.尚未升级尚未与流式音频配合使用.你甚至不会在那里看到你的指令.但它与您的设备一起使用时应该可以正常工作
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)