Skip to content

Podcastをalexaスキルとして公開するlambda関数

Notifications You must be signed in to change notification settings

yatteikifm/yatteskill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f01a2c2 · Feb 11, 2018

History

1 Commit
Feb 11, 2018
Feb 11, 2018
Feb 11, 2018
Feb 11, 2018
Feb 11, 2018
Feb 11, 2018
Feb 11, 2018

Repository files navigation

yatteskill

alexaスキルでpodcastの再生

下記のユーザー登録が必要

Alexa Skill Kit -> Audio Playerで「はい」のチェックボックスを設定、 AWS Lambdaを使用する。

ファイル構成

.
├── IntentSchema.json
├── README.md
├── Utterances.txt
├── event.json
├── functions
│   └── podcast
│       ├── constants.js
│       ├── function.json.sample
│       ├── index.js
│       ├── language.js
│       ├── lib
│       │   ├── feed.js
│       │   └── handlers.js
│       ├── package-lock.json
│       └── package.json
└── project.json.sample

3 directories, 13 files

IntentSchema.json Amazon開発者コンソール -> Alexa Skill Kit -> 対話モデル -> インテントスキーマ

Utterances.txt Amazon開発者コンソール -> Alexa Skill Kit -> 対話モデル -> サンプル発話

event.json Alexaから送信されるリクエストjsonのサンプル

セットアップ

cp project.json.sample project.json
cp functions/podcast/function.json.sample functions/podcast/function.json

export YOUR_ROLE=''
sed -i -e "s/YOUR_ROLE/${YOUR_ROLE}/g" project.json
export YOUR_APPLICATION_ID=''
sed -i -e "s/YOUR_APPLICATION_ID/${YOUR_APPLICATION_ID}/g" functions/podcast/function.json

デプロイ

cd functions/podcast
npm install
cd ../../
apex deploy

テスト

apex invoke podcast < event.json | jq

ログ

apex logs -f

About

Podcastをalexaスキルとして公開するlambda関数

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published