Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Alexa Skills kit SDK for Python を使ってみた
Search
Ippei Sumida
September 03, 2018
Programming
0
400
Alexa Skills kit SDK for Python を使ってみた
AAJUG Vol.2でLTしたスライドです。 #aajug
Ippei Sumida
September 03, 2018
Tweet
Share
More Decks by Ippei Sumida
See All by Ippei Sumida
DROBEの生成AI活用事例 with AWS
ippey
0
190
みんなでQAしてる話
ippey
0
110
AIで生成したものをAIでチェックしてる話
ippey
0
2.1k
『WordPressコミュニティで学ぶ』OSS貢献の多様性
ippey
0
910
25分で理解する!Symfonyの魅力とその実践的活用法
ippey
1
7.2k
素早いバリュー提供のための DROBEの新戦略
ippey
0
1.4k
Symfony 6.3のおすすめ新機能まとめ
ippey
1
1.9k
PhpStorm + GitHub Copilotはいいぞ
ippey
0
2.7k
それぞれの特徴から考えるフレームワーク選び
ippey
1
1k
Other Decks in Programming
See All in Programming
イベントストーミングから始めるドメイン駆動設計
jgeem
4
860
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
380
レガシーシステムの機能調査・開発におけるAI利活用
takuya_ohtonari
0
600
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
2
580
機械学習って何? 5分で解説頑張ってみる
kuroneko2828
0
220
セキュリティマネジャー廃止とクラウドネイティブ型サンドボックス活用
kazumura
1
180
Datadog RUM 本番導入までの道
shinter61
1
300
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
1
290
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
9
1.7k
業務自動化をJavaとSeleniumとAWS Lambdaで実現した方法
greenflagproject
1
120
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
220
Perplexity Slack Botを作ってAI活用を進めた話 / AI Engineering Summit プレイベント
n3xem
0
660
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
123
52k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
700
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
It's Worth the Effort
3n
184
28k
Transcript
Alexa Skills kit SDK for Python ΛͬͯΈͨ 2018.09.03 AAJUG #2
# whoami - ֯ాɹҰฏʢ͢Έͩɹ͍͍ͬʣ - ϑϦʔϥϯε - PHPͱ͔ - CoderDojoຕํͬͯ·͢
- Alexa Skill Contest Լ͔Β͑ͯ2Ґ
※ͬͯΈͨϨϕϧͰ͢ɻ ʢ·ͩεΩϧ࡞ͬͯΔ్தʣ
None
None
͍ͭ࠷ۙެ͔ࣜΒ Python༻ͷSDK͕ൃදʂ
Requirement • Python 2.7, Python 3.6Ҏ্ • VirtualenvʢԾڥߏஙπʔϧʣ • Lambda͕͑Δ
What’s Python ?
Python • ίʔυ͕γϯϓϧ • ίʔυྔ͕গͳ͍ • Մಡੑ͕ߴ͍
ͬͯΈͨ
Πϯετʔϧ virtualenv skill source skill/bin/activate pip install ask-sdk
from ask_sdk_core.skill_builder import SkillBuilder from ask_sdk_core.dispatch_components import AbstractRequestHandler from ask_sdk_model.ui
import SimpleCard from ask_sdk_core.utils import is_intent_name, is_request_type class HelloWorldIntentHandler(AbstractRequestHandler): def can_handle(self, handler_input): return is_request_type("IntentRequest") and is_intent_name("HelloWorldIntent") def handle(self, handler_input): speech_text = "Hello World"; return handler_input.response_builder.speak(speech_text).set_card( SimpleCard("Hello World", speech_text)).response sb = SkillBuilder() sb.request_handlers.extend([ HelloWorldIntentHandler() ]) handler = sb.lambda_handler() Ϋϥεόʔδϣϯ
from ask_sdk_core.skill_builder import SkillBuilder from ask_sdk_core.utils import is_intent_name from ask_sdk_model.ui
import SimpleCard sb = SkillBuilder() @sb.request_handler(can_handle_func=is_intent_name("HelloWorldIntent")) def hello_world_intent_handler(handler_input): speech_text = "Hello World!" return handler_input.response_builder.speak(speech_text).set_card( SimpleCard("Hello World", speech_text)).response handler = sb.lambda_handler() σίϨʔλʔόʔδϣϯ
ʢݸਓతʹʣ ݟ௨͕͠ྑ͍ʂ
ख์͠Ͱتͳ͍
lambdaͷΞοϓϩʔυ ϑΝΠϧ࡞
node.jsͷ߹
cd /path/to/project zip project.zip .
6.5MB
Pythonͷ߹
cd /path/to/project zip project.zip project.py cd venv/lib/python3.6/site-packages zip -r9g /path/to/project/project.zip
.
12.2MB
Node.js > Python खؒతʹ
Node.js < Python ݸਓతʹ