Alexa スキルの作成

  • リリースバージョン: Yokohama
  • 更新日 2025年01月30日
  • 所要時間:2分
  • Alexa 開発者コンソールを使用して、Alexa でホストされるスキルを作成します。Alexa スキルを作成すると、Alexa アプリの使用に向けて準備する際に役立ちます。

    始める前に

    必要なロール:admin

    手順

    1. Amazon 開発者アカウントで Alexa 開発者コンソールにログインします。
    2. [スキルを作成 (Create Skill)] をクリックします。
    3. [スキル名 (Skill name)] フィールドにスキル名を入力します。
    4. [デフォルト言語 (Default language)] リストから、スキルを追加するデフォルト言語を選択します。
    5. [スキルを追加するモデルを選択 (Choose a model to add your skill)] で、[カスタム] を選択します。
    6. [スキルのバックエンドリソースをホスティングする方法を選択 (Choose a method to host your skill's backend resources)] で、[Alexa-Hosted (Node.js)] を選択します。
    7. [スキルを作成 (Create skill)] をクリックします。
    8. スキルを追加するため、[新規作成 (Start from Scratch)] テンプレートを選択します。
    9. [テンプレートで続ける (Continue with Template)] をクリックします。
      注:
      Alexa でホストされるスキルの作成には数分かかります。
    10. スキルで、次の場所に移動します: インタラクションモデル > インテント > JSON エディター.
    11. 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"
                                  }
                              }
                          ]
                      }
                  ]
              }
          }
      }
    12. [モデルを保存 (Save Model)]をクリックします。
    13. 次のように移動する。 発動 > スキル発動名.
    14. [スキルの呼び出し名 (Skill Invocation Name)] フィールドに、スキルの発動名を入力します。
      注:
      スキル名は、Alexa デバイスでスキルを呼び出すために使用する名前です。

      例:<ask <スキル名>.

    15. [インターフェイス (Interfaces)] に移動し、[Alexa Presentation Language] を有効にします。
      注:
      このオプションでは、Alexa で使用するすべてのスクリーンデバイスが有効になります。
    16. [インターフェイスを保存 (Save Interfaces)] をクリックします。