【发布时间】:2018-02-09 06:09:52
【问题描述】:
我正在写一个简单的技能,我想显示一个全屏图像。我在Alexa skill pages上找到了一段示例代码
def build_speechlet_response(title, output, reprompt_text, should_end_session):
return {
"outputSpeech": {"type":"PlainText","text":"This is your cow!"},
"card": {
"type": "Standard",
"title": "Cow picture",
"text": "This is your cow",
"image": {
"smallImageUrl": "https://s3.amazonaws.com/icepick-alexa/cow.jpg",
"largeImageUrl": "https://s3.amazonaws.com/icepick-alexa/cow.jpg"
}
}
}
我知道我的图像托管是可以的,因为当我使用模板时,我可以将图像显示为背景图像..但我只想要它全屏而不是背景。
此代码在 Alexa 技能在线模拟器中运行良好,我在那里看到了图像。但是,当我在我的 Alexa Echo Spot 上运行代码时,它会显示文本但没有图像。我尝试了不同尺寸的不同图像,但没有帮助。
【问题讨论】:
-
最坏情况:将图像转换为 ascii 艺术
-
嗯,图像是动态的.. 不需要转换为 ascii,我认为应该要求显示它们..