Alexa请求的supportInterfaces属性

时间:2018-10-22 19:22:48

标签: alexa alexa-skills-kit voice-recognition

Alexa documentation通过以下方式描述其请求中的supportedInterfaces属性:

enter image description here

除了此处提到的AudioPlayer,在哪里可以看到可以在请求中显示的受支持接口的完整列表

当前,从Alexa开发人员控制台进行测试时,未填充supportedInterfaces的集合。

enter image description here

这是正常行为吗?我认为至少应该填充一个AudioPlayer还是不应该?如何使它填充?

2 个答案:

答案 0 :(得分:1)

Echo Show具有以下键:

"supportedInterfaces":{
    "Display":{},
    "AudioPlayer": {},             
    "VideoApp":{}
}

来源:https://developer.amazon.com/blogs/alexa/post/12826e9e-e06a-4ab4-a583-8e074709a9f3/how-to-build-alexa-skills-for-echo-show1

我注意到在使用该应用程序时,您也会得到这个:

"supportedInterfaces": {
    "Geolocation": []
}

答案 1 :(得分:1)

ASK-SDK团队为其代码库维护TypeScript定义。您可以通过进入node_modules目录并查看ask-sdk-model/index.d.ts来检查支持哪些接口。

从v1.17.0开始,这些是:

/**
 * An object listing each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface.
 * @interface
 */
export interface SupportedInterfaces {
    'Alexa.Presentation.APL'?: interfaces.alexa.presentation.apl.AlexaPresentationAplInterface;
    'AudioPlayer'?: interfaces.audioplayer.AudioPlayerInterface;
    'Display'?: interfaces.display.DisplayInterface;
    'VideoApp'?: interfaces.videoapp.VideoAppInterface;
    'Geolocation'?: interfaces.geolocation.GeolocationInterface;
}