LoginSignup
1
0

More than 5 years have passed since last update.

Alexa開発メモ

Last updated at Posted at 2018-11-09

Windows10環境でpython3を使用しalexaのskill開発を行うメモ

開発環境

リンク

alexa道場
https://developer.amazon.com/ja/alexa-skills-kit/webinars

ASK CLI

リファレンス
https://developer.amazon.com/ja/docs/smapi/ask-cli-command-reference.html

準備

1.Node.jsをインストール

使い方

スキルの新規作成

リファレンス
https://developer.amazon.com/ja/docs/smapi/ask-cli-command-reference.html#new-command

ask new
ask new --template

デプロイ

ask deploy

注意事項として、「.ask/config」ファイルの
[deploy_settings]-[endpoint]-[uri]にスキル名が入るので、全角や記号がある場合は英字のみにすること。

クローン

ask clone -s <スキルID> 

python

リファレンス
https://developer.amazon.com/ja/docs/sdk/alexa-skills-kit-sdk-for-python.html

SDKのセットアップ
https://alexa-skills-kit-python-sdk.readthedocs.io/ja/latest/GETTING_STARTED.html

python仮想環境

SDKのセットアップにある「オプション1: SDKを仮想環境にセットアップする」の仮想環境を構築する。
仮想環境
https://www.python.jp/install/windows/virtualenv.html

上記ページを参考にインストールし、仮想環境を構築する。

py -m pip install virtualenv
py -m virtualenv skill

仮想環境に移動し、SDKをインストールする

skill\Scripts\activate
pip install ask-sdk

pythonテンプレート

ask new --template CloneMe --url https://s3.amazonaws.com/jk-ask/templates.json --skill-name "my skill"

skill.jsonの"en-US"を"ja-JP"に変更
modules/en-US.jsonのファイル名をja-JP.jsonに変更

わからないこと

・自分のスキルをクローンし、一部を変更して新規スキルとする方法

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0