Alexa スキルの作成
Alexa 開発者コンソールを使用して、Alexa でホストされるスキルを作成します。Alexa スキルを作成すると、Alexa アプリの使用に向けて準備する際に役立ちます。
始める前に
必要なロール:admin
手順
- Amazon 開発者アカウントで Alexa 開発者コンソールにログインします。
- [スキルを作成 (Create Skill)] をクリックします。
- [スキル名 (Skill name)] フィールドにスキル名を入力します。
- [デフォルト言語 (Default language)] リストから、スキルを追加するデフォルト言語を選択します。
- [スキルを追加するモデルを選択 (Choose a model to add your skill)] で、[カスタム] を選択します。
- [スキルのバックエンドリソースをホスティングする方法を選択 (Choose a method to host your skill's backend resources)] で、[Alexa-Hosted (Node.js)] を選択します。
- [スキルを作成 (Create skill)] をクリックします。
- スキルを追加するため、[新規作成 (Start from Scratch)] テンプレートを選択します。
-
[テンプレートで続ける (Continue with Template)] をクリックします。
注:Alexa でホストされるスキルの作成には数分かかります。
- スキルで、次の場所に移動します: インタラクションモデル > インテント > JSON エディター.
-
JSON エディターを次の JSON スクリプトに置き換えます。
{ "interactionModel": { "languageModel": { "invocationName": "now agent", "intents": [ { "name": "AMAZON.CancelIntent", "samples": [] }, { "name": "AMAZON.HelpIntent", "samples": [] }, { "name": "AMAZON.StopIntent", "samples": [] }, { "name": "AMAZON.NavigateHomeIntent", "samples": [] }, { "name": "EverythingIntent", "slots": [ { "name": "EverythingSlot", "type": "Bag_of_words" } ], "samples": [ "{EverythingSlot}" ] } ], "types": [ { "name": "Bag_of_words", "values": [ { "name": { "value": "value: Hello world" } }, { "name": { "value": "name: bag_of_words" } } ] } ] } } } - [モデルを保存 (Save Model)]をクリックします。
- 次のように移動する。 発動 > スキル発動名.
-
[スキルの呼び出し名 (Skill Invocation Name)] フィールドに、スキルの発動名を入力します。
注:スキル名は、Alexa デバイスでスキルを呼び出すために使用する名前です。
例:<ask <スキル名>.
-
[インターフェイス (Interfaces)] に移動し、[Alexa Presentation Language] を有効にします。
注:このオプションでは、Alexa で使用するすべてのスクリーンデバイスが有効になります。
- [インターフェイスを保存 (Save Interfaces)] をクリックします。