Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bu noktada, örneği çalıştırmaya ve sorgu yapmaya hazırsınız demektir.
Aşağıdaki komutta:
my-dev-project değerini şununla değiştir:
kullandığınız Actions Console projesinin Google Cloud Platform proje kimliği
oluşturuldu. Actions Console'da proje kimliğini bulmak için:
projeyi seçin, dişli simgesini tıklayın ve Proje ayarları'nı seçin.
my-model kısmını, kullandığınız modelin adıyla değiştirin
önceki adımda oluşturulur.
(İsteğe bağlı) device-nickname yerine bir takma ad kullanın
cihaz için. text-query kısmını istediğiniz bir sorguyla değiştirin
Asistan, başladıktan sonra otomatik olarak yanıt verebilir.
Google Asistan'ın dilini değiştirmek veya kişisel sonuçları etkinleştirmek için
Google Asistan uygulamasını kullanın.
Aynı ağda Cast uyumlu bir cihazınız varsa ve
aynı kullanıcı hesabıyla oturum açtığınızda, bu hesabı uzaktan kontrol edebilirsiniz:
Ok Google, Mutfak Hoparlöründe Spotify'ı çal.
Bir sesli mesaj yayınlamak için öncelikle
Google Asistan uygulaması.
Daha sonra şunları deneyin:
Ok Google, Akşam yemeğine gel'i yayınla.
Cihaz örneği kimliğini bulma
Örneği ilk kez çalıştırdığınızda örnek bir cihaz örneği oluşturur.
emin olmanız gerekir. Bu cihaz örneği cihazla ilişkilendirilecek
belirttiğiniz modeldir. Örneği kendiniz de oluşturabilirsiniz
kayıt aracını kullanabilirsiniz.
Örnek, cihaz örneği kimliğini kaydeder. Örneği aynı
model kimliğini almak için varsayılan olarak kayıtlı cihaz örneği kimliğini kullanır.
Google Asistan artık cihazınızda çalıştığına göre
uzatacağım. Sonraki olası adımlardan bazılarına buradan göz atabilirsiniz.
veya Cihaz İşlemleri oluşturmaya devam edin.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[[["\u003cp\u003eThe Google Assistant Library for Python is deprecated; use the Google Assistant Service instead.\u003c/p\u003e\n"],["\u003cp\u003eTo run the sample, replace placeholders with your project ID, model name, and optional nickname/query.\u003c/p\u003e\n"],["\u003cp\u003eYou can interact with the Assistant using voice commands for tasks like playing music, broadcasting messages, and getting information.\u003c/p\u003e\n"],["\u003cp\u003eThe sample generates a device instance ID, which can be found in the console output.\u003c/p\u003e\n"],["\u003cp\u003eAfter setup, you can explore next steps like extending functionality and creating Device Actions.\u003c/p\u003e\n"]]],["The Google Assistant sample can be run using the command `googlesamples-assistant-hotword` with specified project ID and device model. The Assistant can be activated by saying \"Ok Google\" or \"Hey Google\" and posing a query. The sample generates a unique device instance ID, saved for future use with the same model ID. The Assistant can interact with Cast-enabled devices and broadcast messages, after setup in the Google Assistant app. Further customization, and Device Actions, can be implemented.\n"],null,["# Run the Sample Code\n\n| **Warning:** The Google Assistant Library for Python is deprecated as of June 28th, 2019. Use the [Google Assistant Service](/assistant/sdk/guides/service/python) instead.\n\n\u003cbr /\u003e\n\nAt this point, you are ready to run the sample and make a query.\n\nIn the following command:\n\n- Replace \u003cvar translate=\"no\"\u003emy-dev-project\u003c/var\u003e with\n the Google Cloud Platform project ID for the Actions Console project you\n created. To find the project ID in the [Actions Console](https://console.actions.google.com/),\n select the project, click the gear icon, and select **Project settings**.\n\n- Replace \u003cvar translate=\"no\"\u003emy-model\u003c/var\u003e with the name of the model you\n created in the previous [step](/assistant/sdk/guides/library/python/embed/register-device).\n\n- (Optional) Replace \u003cvar translate=\"no\"\u003edevice-nickname\u003c/var\u003e with a nickname\n for the device. Replace \u003cvar translate=\"no\"\u003etext-query\u003c/var\u003e with a query you want\n the Assistant to automatically answer once it has started.\n\n```\ngooglesamples-assistant-hotword --project-id my-dev-project --device-model-id my-model [--nickname device-nickname] [--query text-query]\n```\n\nSay *Ok Google* or *Hey Google*, followed by your query. You can try some of the\nfollowing:\n\n- *Who am I?*\n- *Listen to This American Life podcast.*\n- *What is the weather in San Francisco?*\n\nIf the Assistant does not respond, follow the [troubleshooting instructions](/assistant/sdk/guides/library/troubleshooting#hotword).\n\nTo change the language for the Google Assistant or to enable personal results,\nuse the Google Assistant [app](/assistant/sdk/reference/assistant-app/assistant-settings).\n\nIf you have a [Cast-enabled](/cast) device on the same network and configured\nwith the same user account, you can control it remotely:\n\n- *Ok Google, play Spotify on the Kitchen Speaker*.\n\nTo broadcast a voice message, make sure to first set the device location in the\nGoogle Assistant [app](/assistant/sdk/reference/assistant-app/assistant-settings).\nThen try the following:\n\n- *Ok Google, broadcast Come to dinner*.\n\nFind the device instance ID\n---------------------------\n\nWhen you run the sample the first time, it will generate a device instance for\nyour particular device. This device instance will be associated with the device\nmodel that you specified to run the sample. You can also create the instance\nyourself using the [registration tool](/assistant/sdk/reference/device-registration/device-tool#register-device).\n\nThe sample saves the device instance ID. If you run the sample with the same\nmodel ID, it defaults to using the saved device instance ID.\n\nFind the device instance ID in the console for the sample. \n\n device_model_id: my-model\n device_id: 1C3E1558B0023E49F71CA0D241DA03CF # Device instance ID\n\n Registering...Done.\n\n ON_MUTED_CHANGED:\n {'is_muted': False}\n ON_START_FINISHED\n ...\n\nNext step\n---------\n\nNow that you have the Google Assistant working on your device, it is time to\nextend it. You can take a look at some possible next steps [here](/assistant/sdk/guides/library/python/embed/next-steps)\nor continue on to creating [Device Actions](/assistant/sdk/guides/library/python/extend/install-hardware)."]]