تم إيقاف إجراءات المحادثات نهائيًا في 13 حزيران (يونيو) 2023. لمزيد من المعلومات، يُرجى الاطّلاع على
إنهاء إجراءات المحادثة.
نظرة عامة على إجراءات الجهاز
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
باستخدام حزمة تطوير البرامج (SDK) من "مساعد Google"، يمكنك تضمين "مساعد Google" في مشروعك الخاص، ما يجعله يعمل بشكل مشابه لجهاز Google Home. ومع ذلك، قد يتضمّن مشروعك إمكانات فريدة للأجهزة لا تتوفّر في Google Home، مثل شاشة LED فريدة مع إعدادات قابلة للتخصيص للسطوع والألوان.
"إجراءات الجهاز" هي مجموعة من الأدوات وواجهات برمجة التطبيقات التي تتيح لك توسيع نطاق ما يمكن أن يفعله "مساعد Google" في المشاريع التي تطوّرها، وذلك للاستفادة إلى أقصى حد من إمكانات الأجهزة.
إجراءات الأجهزة المدمجة
أنشأت Google مجموعة كبيرة من الإجراءات الشائعة المضمّنة في الأجهزة لتنفيذ المهام اليومية، بما في ذلك الإضاءة والأجهزة والكاميرات. باستخدام هذه الإجراءات، يمكنك الاستفادة من إمكانات معالجة اللغة الطبيعية التي يوفّرها "مساعد Google" للتحكّم في مشروعك. على سبيل المثال، يمكن تشغيل مشروع يتضمّن مصباحًا بطرق مختلفة:
- Ok Google، أريد إضاءة المصباح.
- Ok Google، أريد إضاءة المصباح.
- Ok Google، أريد تشغيل الإضاءة في غرفة المعيشة.
يمكنك إنشاء مشروعك الخاص الذي يستجيب للأوامر الخاصة بالعديد من
سمات المنزل الذكي
مثل:
- Ok Google، أريد ضبط مستوى السطوع على %50.
- Ok Google، أريد ضبط درجة الحرارة على 37 درجة.
إجراءات الجهاز المخصّصة
يمكنك أيضًا إنشاء إجراءات مخصّصة للأجهزة لتناسب أجهزتك الفريدة. بالنسبة إلى هذه الإجراءات، عليك تحديد قواعد اللغة والأوامر:
- Ok Google، أريد أن يومض المصباح 5 مرات.
- Ok Google، انتقِل إلى اليسار.
مزيد من المعلومات حول دمج هذه الإجراءات باستخدام خدمة "مساعد Google"
آلية العمل
يجب أن يكون الجهاز مثبّتًا عليه حزمة تطوير البرامج (SDK) الخاصة بـ "مساعد Google"، بالإضافة إلى بيانات الاعتماد اللازمة للوصول إلى خدمة "مساعد Google". يرسل الجهاز الطلب الشفهي
(فعِّل المصباح.) ويطلب من الخدمة تفعيل مصباح LED المدمج في الجهاز.
يرسل الجهاز أيضًا معرّفات الطراز ومثيل الجهاز لكي تتمكّن الخدمة من تحديد أفضل طريقة للردّ على الطلب في سياقه.
تستخدم الخدمة ميزة "التعرّف التلقائي على الكلام" (ASR) لتحديد الكلمات التي نطق بها المستخدم، وميزة "معالجة اللغات الطبيعية" (NLP) لتحليل معنى الطلب وفهمه من هذه الكلمات، وميزة "مطابقة الأجهزة" لتوفير سياق للطلب. هذا السياق مهم لأنه يحدّد الإجراءات التي يتيحها الجهاز وكيفية تنفيذ هذه الإجراءات.
بعد ذلك، تردّ الخدمة بنص يتم نطقه للمستخدم (حسنًا)
إلى جانب الأمر الخاص بالجهاز. يعرف الجهاز كيفية التعامل مع هذا الأمر، إذ يفعّل ضوء LED.

البدء
يمكنك تحويل أفكارك إلى واقع من خلال تضمين "مساعد Google" في مشروعك، ثم إضافة وظائف فريدة باستخدام "إجراءات الأجهزة". يمكنك تطوير مشروعك باستخدام خدمة "مساعد Google".
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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)."]]