alexa

How to make Alexa countdown in seconds

馋奶兔 提交于 2021-01-27 11:52:12
问题 I want to be able to have alexa (audibly) countdown 15 seconds in my skill. I know I can just <break time="15s" /> in SSML. But that isn't audible. I also know I can just do: 15<break time="1s" /> 14<break time="1s" /> or better yet (to account for the time it takes to say the number) 15<break time="0.85s" /> 14<break time="0.85s" /> But that's going to be a ton of repeated code if I do this many times over. So I'm probably going to write a function that takes in a number and a number of

How to make Alexa countdown in seconds

坚强是说给别人听的谎言 提交于 2021-01-27 11:51:02
问题 I want to be able to have alexa (audibly) countdown 15 seconds in my skill. I know I can just <break time="15s" /> in SSML. But that isn't audible. I also know I can just do: 15<break time="1s" /> 14<break time="1s" /> or better yet (to account for the time it takes to say the number) 15<break time="0.85s" /> 14<break time="0.85s" /> But that's going to be a ton of repeated code if I do this many times over. So I'm probably going to write a function that takes in a number and a number of

Alexa Recursive Intent Delegation when using Confirmations

大兔子大兔子 提交于 2020-08-08 05:36:45
问题 I am writing an Alexa dialog with intent confirmation. When confirmation is denied I want to restart the same dialog again by delegating to this very dialog. I am proceeding like described in this stack overflow question. As described in the solution to this question I do the delegation when the dialogState is still IN_PROGRESS . In my case Alexa always responds with the not very meaningful message There was a problem with the requested skill's response . No error message in the application

Sample python code for Account Linking in Amazon Alexa

老子叫甜甜 提交于 2020-05-14 12:11:59
问题 Where can i find the sample Python code for Account linking in Amazon Alexa. I was only able to get the documentation here. https://developer.amazon.com/docs/account-linking/understand-account-linking.html Please help me !! 回答1: Account linking works the same way for all languages and you should be familiar with OAuth2 to configure account linking in developer portal. Users can link account in two ways: From the skill detail card in the Alexa app while enabling the skill. From a link account

How to clear custom slot value programmatically in Alexa?

允我心安 提交于 2020-03-23 07:53:21
问题 I have an Alexa skill which requires to programmatically override the values given by the user. I have tried nullifying the value and later pass it in as the "updated Intent". this.event.request.intent.userPrompt.value = null; var updatedIntent = this.event.request.intent; this.emit(':elicitSlot', 'userPrompt',"Say something","Say something", updatedIntent); However, the input JSON shows previous value. Is there a solution to this? 回答1: there is delete this.event.request.intent.slots.

基于USB麦克风的娱乐功能

穿精又带淫゛_ 提交于 2020-01-26 03:50:30
基于4麦克风阵列(ReSpeaker 4-Mic Array)的娱乐功能包括 点歌,讲故事,相声,评书,天气预报和股市行情等 是淘宝上买的 套件,人家已经完全布好 并给了镜像文件,直接烧录到SD卡即可树莓派3B+上使用。上面附有说明书,运行程序前需要先进入虚拟环境,否则无法正常运行。 使用前,先授权,有效期只有一个月,运行 dueros-auth 获取百度的授权。 授权的文件保存在/home/pi/.avs.json。 但是麦克风阵列(ReSpeaker 4-Mic Array)影响我使用树莓派的其它引脚,所以打算改成基于USB麦克风的,亚马逊官网查了一下,人家本来就是针对USB麦克风的,我这行为类似于历史倒退,但适合我的需求,我喜欢,那就折腾吧! 首先 ,汉语搜不到任何资料,自己将文件夹内的.py文件 翻了个遍,也没有改成,老是提示 arecord录音错误,找不到录音设备(虽然安了pyaudio,看来没有使用,倍感清醒),感觉不是我理解的问题,应该解决硬件问题,单句执行 arecord -d 3 -c 2 -r 44100 -f S16_LE xiaoben.wmv 发现果真不能用(见我的“树莓派(USB麦克风和麦克风阵列) 录音和播放”https://blog.csdn.net/weixin_44345862/article/details/101355529)

Amazon DynamoDB DocumentClient().get() use values outside of function

放肆的年华 提交于 2020-01-25 03:05:27
问题 How can I get data.Item.Name outside of docClient.get() to further use it in other functions. const docClient = new awsSDK.DynamoDB.DocumentClient(); docClient.get(dynamoParams, function (err, data) { if (err) { console.error("failed", JSON.stringify(err, null, 2)); } else { console.log("Successfully read data", JSON.stringify(data, null, 2)); console.log("data.Item.Name: " + data.Item.Name); } }); // how can i use "data.Item.Name" here: console.log(data.Item.Name); return handlerInput