用用户指定间隔计数的Alexa技能
我正在尝试创建一种在用户指定的间隔中计入用户指定数字的技能。 例如,我会说Alexa以2秒的时间间隔
我可以在python中做到这一点,但是在编码Alexa技能方面,我是个菜鸟。显然,Alexa现在拥有Python服务。因此,我只能编辑lambda_function.py代码。 如何将Python脚本与Alexa代码库集成?
Python代码将很简单:
from time import sleep
for num in range(1, user_end):
print(num)
sleep(user_interval)
I am trying to create a skill that counts to a user specified number in user specified intervals.
For example I would say Alexa count to 30 in intervals of 2 seconds
I can do it in python but i am a noob when it comes to coding alexa skills. Apparently Alexa now has a python service. So i can just edit the lambda_function.py code.
How do i integrate my python script with the alexa code base?
The python code would be as simple as:
from time import sleep
for num in range(1, user_end):
print(num)
sleep(user_interval)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应该允许您创建这样的动态响应。
这是对我有用的示例文档和数据源。
文档
数据源:
您的技能可以将这些指令添加到其响应中:
APL for Audio should allow you to create a dynamic response like this.
Here's a sample document and data source that works for me.
Document
Data Source:
Your skill can piece those together an add the following directive to its response: