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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ippei Sumida
September 03, 2018
Programming
450
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Alexa Skills kit SDK for Python を使ってみた
AAJUG Vol.2でLTしたスライドです。 #aajug
Ippei Sumida
September 03, 2018
More Decks by Ippei Sumida
See All by Ippei Sumida
DROBEの生成AI活用事例 with AWS
ippey
0
320
みんなでQAしてる話
ippey
0
180
AIで生成したものをAIでチェックしてる話
ippey
0
2.3k
『WordPressコミュニティで学ぶ』OSS貢献の多様性
ippey
0
1.3k
25分で理解する!Symfonyの魅力とその実践的活用法
ippey
1
7.8k
素早いバリュー提供のための DROBEの新戦略
ippey
0
1.5k
Symfony 6.3のおすすめ新機能まとめ
ippey
1
2.2k
PhpStorm + GitHub Copilotはいいぞ
ippey
0
3.2k
それぞれの特徴から考えるフレームワーク選び
ippey
1
1.2k
Other Decks in Programming
See All in Programming
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.7k
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
160
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
330
AIエージェントで 変わるAndroid開発環境
takahirom
2
710
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
150
Claude Team Plan導入・ガイド
tk3fftk
0
220
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
1
420
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
8
3.1k
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.3k
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
180
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
140
自作OSでスライド発表する
uyuki234
1
3.9k
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
450
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.1k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
380
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
590
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
640
How to build a perfect <img>
jonoalderson
1
5.8k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
350
Making the Leap to Tech Lead
cromwellryan
135
10k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
220
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
490
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 ݸਓతʹ