2017-07-15 106 views
1

我一直在这个问题上撞了我的头2天,并将解决方案张贴在希望它可以帮助过去的人。我创建了一个Alexa技能来流式播放电台,即使使用示例代码也无法播放它。最后,我只是硬编码发送电线的值,并且它仍然没有工作。下面是我送:Alexa的技能不会播放我的流媒体音频

{ 
 
    "version": "1.0", 
 
    "response": { 
 
    "shouldEndSession": 1, 
 
    "response": { 
 
     "outputSpeech": { 
 
     "text": "Playing Somgwriters island", 
 
     "type": "PlainText" 
 
     }, 
 
     "directives": [ 
 
     { 
 
      "playBehavior": "REPLACE_ALL", 
 
      "audioItem": { 
 
      "stream": { 
 
       "url": "http://la2-ssd.myautodj.com:8198/stream.mp3", 
 
       "token": "", 
 
       "offsetInMilliseconds": 0 
 
      } 
 
      }, 
 
      "type": "AudioPlayer.Play" 
 
     } 
 
     ], 
 
     "reprompt": {}, 
 
     "card": {} 
 
    } 
 
    }, 
 
    "sessionAttributes": {}, 
 
    "statusCode": "200" 
 
}

回答

1

我终于找到了事业的documentation

audioItem.stream.url: 在远程标识的音频内容的位置HTTPS位置。 音频文件必须托管在Internet可访问的HTTPS端点上。 HTTPS是必需的,托管文件的域必须提供有效的,可信的SSL证书。自签证书不能使用。许多内容托管服务提供这一点。例如,您可以将文件托管在Amazon Simple Storage Service(Amazon S3)(Amazon Web Services产品)等服务中。

相关问题