我希望我的技巧能够提到一个4到5个字符的代码,它可以包含字母或数字,如AB05或ABC12.我如何设计Alexa的插槽和话语以理解这些并将它们传递给我的技能?
我在Alexa Skills Kit(ASK)文档中找不到任何内容,允许开发人员告诉Alexa播放长(90秒以上)的音频片段.
你如何让Echo播放长MP3文件?
该SSML音频标签可以播放MP3文件,但它是限制为90秒,并具有在48 kbps的编码.
我想拥有自定义技能,但需要直接访问用户语音(录制音频的输出).可以/将Alexa中继流而不是发送请求调用(启动/意图/会话结束)?
我理解自定义技能可以将mp3作为响应发送回来,但是能够获得对实际语音请求(流或mp3)的访问将是非常棒的.
编辑:
似乎请求对象中没有提供的mp3:https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-interface-reference#LaunchRequest
我正在构建一个需要能够处理问题答案的Alexa应用程序.我的SkipIntent意图有样本话语来跳过一个问题.
我想构建一个AnswerIntent可以获取任何答案的答案,并根据正确答案处理它们.我尝试使用一个Amazon.LITERAL类型的一些类型(从这个问题:如何接受自由格式文本作为Amazon Skill Kit的输入?):
AnswerIntent {bottle|Answer}
AnswerIntent is it {bottle|Answer}
AnswerIntent is it a {bottle|Answer}
AnswerIntent is it an {bottle|Answer}
AnswerIntent a {bottle|Answer}
AnswerIntent an {bottle|Answer}
AnswerIntent {pillow|Answer}
AnswerIntent is it {pillow|Answer}
AnswerIntent is it a {pillow|Answer}
AnswerIntent is it an {pillow|Answer}
AnswerIntent a {pillow|Answer}
AnswerIntent an {pillow|Answer}
Run Code Online (Sandbox Code Playgroud)
这实际上有效,如果我在前面加上"是它"或其他一个定义的前缀,但它没有获得"仅答案"的部分.它似乎与我的混淆SkipIntent被定义为:
SkipIntent i don't know
SkipIntent don't know
SkipIntent skip
SkipIntent i don't know that
SkipIntent who knows
SkipIntent i don't know …Run Code Online (Sandbox Code Playgroud) 我试图进入ASK,我只是尝试了一个SSML的虚拟示例.我正在使用Amazon Lambda和Python.如果我从Lambda控制台测试我的代码,我得到预期的输出:
{
"version": "1.0",
"response": {
"outputSpeech": {
"text": "<speak><audio src='https://s3.amazonaws.com/aws-website-resources-1183x/dice-die-roll.mp3' />Three</speak>",
"type": "SSML"
},
"shouldEndSession": true,
"card": {
"content": "Three.",
"type": "Simple",
"title": "Dice"
}
}
}
Run Code Online (Sandbox Code Playgroud)
当我去Alexa服务模拟器并尝试任何请求时,输出语音中的文本消失了,控制台中的"Listen"按钮被禁用,如果我在Echo上尝试它,它就不会播放任何内容:
{
"version": "1.0",
"response": {
"outputSpeech": {
"type": "SSML"
},
"card": {
"content": "Three.",
"title": "Dice",
"type": "Simple"
},
"shouldEndSession": true
}
}
Run Code Online (Sandbox Code Playgroud)
如果我将SSML复制/粘贴<speak><audio src='https://s3.amazonaws.com/aws-website-resources-1183x/dice-die-roll.mp3' />Three</speak>到语音模拟器中,我可以播放它并按预期播放.我已经使用ffmpeg转换了mp3文件:ffmpeg -y -i a.mp3 -ar 16000 -ab 48k -codec:a libmp3lame -ac 1 output.mp3我明白亚马逊的S3应该值得信赖,可能是什么问题?我尝试在SSML中使用单引号和双引号,我尝试转义引号无济于事.谁知道我应该研究什么?
我在使用TestAlexa Developer门户网站的部分时收到此错误
错误:无法解析提供的SSML.提供的文本无效SSML.
我收到成功的响应并按下listen按钮后发生错误.
响应输出是:
{
"version": "1.0",
"response": {
"outputSpeech": {
"type": "PlainText",
"text": "Here are some recent stories about siemens:Citigroup Inc. Reaffirms Buy Rating for Siemens AG (SIE)Siemens AG (SIE) Rating Reiterated by Citigroup Inc.Global Hydrophone Market Report 2014-2021 - Analysis, Technologies & Forecasts - Vendors: Siemens, Sensor Technology, Cetacean Research Technology - Research and MarketsSiemens Bags The 2016 Frost & Sullivan Asia-Pacific Building Technologies Company Of The Year Award"
},
"reprompt": {
"outputSpeech": {
"type": …Run Code Online (Sandbox Code Playgroud) 我试图在不使用Lambda的情况下创建自定义Alexa技能.因此,我已将Spring Boot应用程序部署到AWS EC2实例,设置SSL证书,并通过使用Postman调用该服务来测试该服务是否正常运行.
然后我将Alexa技能设置为"https"端点.当我在developer.amazon.com上使用Test表单时,我回过头来:
无法调用远程端点,或者它返回的响应无效.
当我直接用Postman调用服务时,我得到:
{
"version": "1.0",
"response": {
"outputSpeech": {
"type": "PlainText",
"id": null,
"text": "Hello, World. I am a Spring Boot custom skill."
},
"card": {
"type": "Simple",
"title": "HelloWorld",
"content": "Hello, World. I am a Spring Boot custom skill."
},
"reprompt": null,
"shouldEndSession": true
},
"sessionAttributes": null
}Run Code Online (Sandbox Code Playgroud)
我的控制器使用Alexa技能集SDK.这是代码:
@RestController
public class AlexaController {
@RequestMapping(value="/alexa",
method=RequestMethod.POST,
produces=MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<SpeechletResponseEnvelope> alexa(Model model) {
String speechText = "Hello, World. I am a Spring Boot custom skill.";
SimpleCard …Run Code Online (Sandbox Code Playgroud) 我正在尝试AMAZON.LITERAL在我的Alexa技能中使用插槽类型,但是当我尝试构建时,我看到了这个错误:
Build Failed
Slot name "{What}" is used in a sample utterance but not defined in the intent schema. Error code: UndefinedSlotName - Thursday, Apr 12, 2018, 2:08 PM
Run Code Online (Sandbox Code Playgroud)
插槽已命名What,我100%确定已定义.如果我将插槽类型更改为除外的任何内容,它将成功构建AMAZON.LITERAL.
这是我的整个模型:
{
"interactionModel": {
"languageModel": {
"invocationName": "chores",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "Remember",
"slots": [
{
"name": "Who",
"type": "AMAZON.Person"
},
{
"name": "When",
"type": "AMAZON.DATE" …Run Code Online (Sandbox Code Playgroud) 我看过亚马逊上的页面,并且了解到1 RCU是4KB的项目。
如果我有一个包含50个项目的表,我已经读过一次扫描将读取全部50个项目并使用50个RCU。但是可以说我做了一个查询,我的表是10 x 5,它还会使用50个RCU吗?
amazon-web-services amazon-dynamodb aws-lambda alexa-skills-kit
我正在尝试将自己的响应添加到自定义意图中。LaunchRequest文本有效,但是除了AMAZON.HelpIntent和其他默认意图之外,我自己的意图未被识别。
目的:
{
"interactionModel": {
"languageModel": {
"invocationName": "my personal heartbeat",
"intents": [
{
"name": "AMAZON.FallbackIntent",
"samples": []
},
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "start",
"slots": [],
"samples": [
"Talk to my personal heartbeat"
]
},
{
"name": "currentbpm",
"slots": [],
"samples": [
"what's my current BPM",
"how fast is my heart beating right now",
"How many beats per minute is my heart making at …Run Code Online (Sandbox Code Playgroud) alexa-skills-kit ×10
alexa-skill ×3
alexa ×2
ssml ×2
amazon-echo ×1
aws-lambda ×1
javascript ×1
node.js ×1
spring ×1
spring-boot ×1