会話型アクションのサポートは 2023 年 6 月 13 日に終了しました。詳細については、
会話型アクションの廃止をご覧ください。
デバイス アクションの概要
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Google Assistant SDK を使用すると、Google アシスタントを独自のプロジェクトに埋め込んで Google Home と同じような機能を実現できます。ただし、お客様のプロジェクトでは Google Home に搭載されていない独自のハードウェア機能(たとえば、明るさと色を変更できる LED ディスプレイなど)を備えている場合があります。
デバイス アクションとは、アシスタントで可能なことを拡張できるツールと API のセットであり、独自のプロジェクトでそのハードウェア機能を最大限に活用するために役立ちます。
組み込みデバイス アクション
Google では、照明、家電、カメラなど、日常的に使用する各種デバイスに共通する組み込みデバイス アクションを幅広く提供しています。これらのアクションを使用すれば、Google アシスタントの自然言語処理能力を利用してプロジェクトを制御できます。たとえば、照明を含むプロジェクトでは、次のようなさまざまなフレーズで照明をオンにすることができます。
- OK Google, 電気をつけて。
- OK Google, 私のライトをつけて。
- OK Google, リビングの照明をつけて。
次のようなスマートホーム トレイト
のコマンドに応答する独自のプロジェクトも作成できます。
- OK Google, 明るさを 50% に設定して。
- OK Google, 温度を 22 度に設定して。
カスタム デバイス アクション
独自のハードウェア用のカスタム デバイス アクションを作成することもできます。これらのアクションでは、文法とコマンドを定義します。
- OK Google, ライトを 5 回点滅させて。
- OK Google, 左に動かして。
Google アシスタント サービスを使用してこれらのアクションを組み込む方法については、こちらをご覧ください。
仕組み
デバイスには Google Assistant SDK がインストールされており、Google アシスタント サービスにアクセスするための認証情報が保存されています。デバイスは音声リクエスト(Turn on.)を送信し、デバイスのオンボード LED を点灯するようアシスタント サービスに要求します。また、サービスがリクエストのコンテキストにおける最良のレスポンスを判断できるように、デバイスのモデルとデバイス インスタンス ID も送信します。
このサービスは、自動音声認識(ASR)を使用してユーザーが発した単語を特定し、自然言語処理(NLP)を使用してこれらの単語からリクエストの意味を分析して理解し、デバイス マッチングを使用してリクエストのコンテキストを提供します。このコンテキストは、デバイスがサポートするアクションと、それらのアクションをどのように実行すべきかを定義するため、重要です。
次に、アシスタント サービスは、ユーザーへの音声応答を示すテキスト(Sure)とデバイス固有のコマンドを返します。デバイスはこのコマンドの処理方法を知っており、LED を点灯させます。

始める
アイデアを現実のものとするため、Google アシスタントをプロジェクトに埋め込み、デバイス アクションで独自の機能を追加しましょう。プロジェクトの開発には Google アシスタント サービスを使用できます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eThe Google Assistant SDK enables you to integrate the Google Assistant into your projects, similar to a Google Home, and leverage Device Actions to utilize unique hardware features.\u003c/p\u003e\n"],["\u003cp\u003eDevice Actions provide tools and APIs to extend the Assistant's capabilities, allowing your project to respond to voice commands for functionalities like lights, appliances, and cameras using built-in or custom actions.\u003c/p\u003e\n"],["\u003cp\u003eBuilt-in Device Actions cover common smart home features, while Custom Device Actions let you define unique voice commands and functionalities tailored to your specific hardware.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Assistant service utilizes Automatic Speech Recognition, Natural Language Processing, and device context to understand user requests and trigger corresponding actions on your device.\u003c/p\u003e\n"],["\u003cp\u003eYou can get started by embedding the Google Assistant into your project and adding custom functionalities with Device Actions using the provided resources and guides.\u003c/p\u003e\n"]]],[],null,["# Device Actions Overview\n\nWith the Google Assistant SDK, you can embed the Google Assistant into your\nown project, making it function similarly to a Google Home. However, your project\nmay have unique hardware capabilities that Google Home does not have: for\nexample, it may have a unique LED display with customizable brightness and\ncolor settings.\n\nDevice Actions are a set of tools and APIs that allow you to extend what\nthe Assistant can do, in the projects you develop, to take full potential of\ntheir hardware capabilities.\n\nBuilt-in Device Actions\n-----------------------\n\nGoogle has created a wide range of common built-in device actions for everyday\nthings, including lights, appliances, and cameras. With these actions, you can\nharness the power of the Google Assistant's natural language processing to\ncontrol your project. For example, a project with a light can be turned on in\ndifferent ways:\n\n- *Ok Google, turn on the light.*\n- *Hey Google, turn my light on.*\n- *Ok Google, turn on my living room light.*\n\nYou can create your own project that responds to commands for\nmany\n[smart home traits](/assistant/sdk/reference/traits)\nlike:\n\n- *Ok Google, set the brightness to 50%.*\n- *Hey Google, set the temperature to 98 degrees.*\n\nCustom Device Actions\n---------------------\n\nYou can also create custom device actions for your own unique hardware. For these\nactions, you define the grammar and commands:\n\n- *Ok Google, blink my light 5 times.*\n- *Hey Google, move left.*\n\nLearn more about incorporating these actions using the [Google Assistant service](/assistant/sdk/guides/service/python/extend/custom-actions).\n\nHow it works\n------------\n\nThe device has the Google Assistant SDK installed on it along with credentials for\naccessing the Google Assistant Service. The device sends out the spoken request\n(*Turn on.*) and asks the service to turn on the device's onboard LED.\nThe device also sends its model and device instance identifiers so the service\ncan determine how to best respond in context to the request.\n\nThe service uses Automatic Speech Recognition (ASR) to determine what words were\nspoken by the user, Natural Language Processing (NLP) to analyze and understand\nthe meaning of the request from these words, and device matching to provide context\nfor the request. This context is important because it defines the actions the\ndevice supports and how these actions should be fulfilled.\n\nThe service then responds with text that is spoken back to the user (*Sure.*)\nalong with the device-specific command. The device knows how to handle this\ncommand: it turns on its LED!\n\nGet started\n-----------\n\nBring your ideas to life by embedding the Google Assistant\ninto your project and then adding unique functionality with Device\nActions. You can develop your project [using the Google Assistant service](/assistant/sdk/guides/service/python)."]]