会話型アクションのサポートは 2023 年 6 月 13 日に終了しました。詳細については、
会話型アクションの廃止をご覧ください。
サンプルコードを実行する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
これで、サンプルを実行してクエリを発行する準備ができました。
このコマンドでは、次の要素を置き換えてください。
my-dev-project
の置き換え
操作している Actions Console プロジェクトの Google Cloud Platform プロジェクト ID
作成されます。Actions Console でプロジェクト ID を確認するには、次の操作を行います。
プロジェクトを選択し、歯車アイコンをクリックして、[プロジェクト設定] を選択します。
my-model
は、作成するモデルの名前に置き換えます。
(前のステップで作成したファイル)に移動します。
googlesamples-assistant-pushtotalk --project-id my-dev-project --device-model-id my-model
Enter キーを押した後、次のクエリを試します。
アシスタントが応答しない場合は、トラブルシューティングの指示に従います。
Google アシスタントの言語を変更する、またはアカウントに基づく情報を有効にするには、
Google アシスタント アプリを使用します。
デバイス インスタンス ID を確認する
サンプルを初めて実行すると、お使いの OS 用のデバイス インスタンスが生成されます。
特定しますこのデバイス インスタンスはデバイスモデルに関連付けられます
指定したものと一致する IP アドレスが割り当てられます。インスタンスを自分で作成することもできます
登録ツールを使用します。
このサンプルはモデル ID とインスタンス ID の両方を保存します。パラメータを指定せずにサンプルを実行すると、
保存された ID をデフォルトで使用します。
サンプルの出力でデバイス インスタンス ID を確認できます。
INFO:root:Connecting to embeddedassistant.googleapis.com
WARNING:root:Device config not found: [Errno 2] No such file or directory: '/home/pi/.config/googlesamples-assistant/device_config.json'
INFO:root:Registering device
INFO:root:Device registered: 0eea18ae-d17e-11e7-ac7a-b827ebb8010f # Device instance ID
Press Enter to send a new request...
次のステップ
デバイスで Google アシスタントを使用できたところで、
拡張します。次のステップについては、こちらをご覧ください。
デバイス アクションの作成に進みます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-07 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-09-07 UTC。"],[[["Run the provided command, replacing placeholders with your project and model IDs, to initiate a sample query."],["Test the setup with example queries like \"Who am I?\", \"What time is it?\", or weather-related questions."],["Locate the device instance ID within the sample's output for future use and potential troubleshooting."],["Refer to provided resources for troubleshooting, language settings, and next steps in extending device functionality."]]],["To run the sample, replace placeholders in the provided command with your Google Cloud project ID and model name. Execute the command and try example queries. If no response, consult troubleshooting. The first run generates a unique device instance ID, displayed in the output, and saves it for future use. The command can be run without arguments if the ID was saved. You can change the language or add personal settings through the Google Assistant app. Further steps like extending or adding device actions are possible.\n"]]