擅长:python、mysql、java
<p>以下代码对我有效:</p>
<pre><code>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
}
}
]
</code></pre>
<p>唯一的区别是URL是https而不是http。</p>
<p>如果在技能模拟器中不起作用,就不要拖延。还没有升级到流媒体音频。你甚至看不到你的指示。但当它和你的设备一起使用时应该会起作用。</p>