Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Alexa Skills kit SDK for Python を使ってみた
Search
Ippei Sumida
September 03, 2018
Programming
460
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
330
みんなでQAしてる話
ippey
0
190
AIで生成したものをAIでチェックしてる話
ippey
0
2.4k
『WordPressコミュニティで学ぶ』OSS貢献の多様性
ippey
0
1.4k
25分で理解する!Symfonyの魅力とその実践的活用法
ippey
1
7.9k
素早いバリュー提供のための DROBEの新戦略
ippey
0
1.5k
Symfony 6.3のおすすめ新機能まとめ
ippey
1
2.2k
PhpStorm + GitHub Copilotはいいぞ
ippey
0
3.3k
それぞれの特徴から考えるフレームワーク選び
ippey
1
1.2k
Other Decks in Programming
See All in Programming
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
400
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
3k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
290
What We Talk About When We Talk About XP
m_seki
2
650
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
610
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
730
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.3k
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
1.8k
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.5k
Featured
See All Featured
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
It's Worth the Effort
3n
188
29k
Are puppies a ranking factor?
jonoalderson
2
3.9k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
360
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
500
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
We Have a Design System, Now What?
morganepeng
55
8.3k
GraphQLとの向き合い方2022年版
quramy
50
15k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
240
Mobile First: as difficult as doing things right
swwweet
225
10k
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 ݸਓతʹ