Kể từ ngày 13 tháng 6 năm 2023, Hành động trò chuyện không còn được dùng nữa. Để biết thêm thông tin, hãy xem phần Hành động trò chuyện ngừng hoạt động.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Dịch vụ Trợ lý Google cho phép bạn toàn quyền kiểm soát việc tích hợp với Trợ lý bằng cách cung cấp một điểm cuối phát trực tiếp. Truyền truy vấn âm thanh của người dùng đến điểm cuối này để nhận phản hồi bằng âm thanh từ Trợ lý Google.
Bạn có thể tạo liên kết cho API này từ nhiều ngôn ngữ (ví dụ: Go, Node.js, C++ và Java) trên tất cả các nền tảng được gRPC hỗ trợ.
Yêu cầu cơ bản về phần cứng
Trước khi bắt đầu, bạn cần có các thành phần sau:
Thiết bị chạy trên một trong các nền tảng được hỗ trợ, có kết nối Internet
Micrô
Loa
Các chặng
Các phần sau có thể áp dụng cho Python và Raspberry Pi.
Nếu bạn không muốn sử dụng Python, hãy sử dụng hướng dẫn tích hợp để tích hợp Dịch vụ Trợ lý Google bằng các ngôn ngữ khác và trên nhiều nền tảng.
Nhúng Trợ lý Google
Phần sau đây sẽ lấy mẫu dịch vụ Trợ lý Google hoạt động trên thiết bị của bạn:
[null,null,["Cập nhật lần gần đây nhất: 2023-05-17 UTC."],[[["\u003cp\u003eThe Google Assistant Service provides a streaming endpoint for integrating the Assistant into your devices for experimental and non-commercial use.\u003c/p\u003e\n"],["\u003cp\u003eYou need a device with internet, microphone, and speaker to get started with the Google Assistant Service integration.\u003c/p\u003e\n"],["\u003cp\u003eThe guide provides step-by-step instructions for embedding and extending the Google Assistant using Python on a Raspberry Pi.\u003c/p\u003e\n"],["\u003cp\u003eYou can find resources for integrating with other languages and platforms using the provided integration guide.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Assistant SDK cannot be used for commercial devices.\u003c/p\u003e\n"]]],["The Google Assistant Service provides a streaming endpoint for integrating with the Assistant, accepting user audio queries and returning audio responses. It supports multiple languages and platforms. Core actions include setting up hardware (device, microphone, speaker), configuring audio and developer accounts, registering a device model, installing the SDK and sample code, and running the sample. The service can also be extended to handle device actions by installing hardware, registering traits, and handling commands. Commercial use is prohibited.\n"],null,["# Introduction to the Google Assistant Service\n\n| **Warning:** You can't launch commercial devices that integrate with the Google Assistant SDK. It's available for experimental and non-commercial uses only.\n\n\u003cbr /\u003e\n\nThe Google Assistant Service gives you full control over the integration with\nthe Assistant by providing a streaming endpoint. Stream a user audio query to\nthis endpoint to receive a Google Assistant audio response.\n\nYou can generate bindings for this API from a variety of languages (for example,\nGo, Node.js, C++, and Java) on all platforms supported by [gRPC](http://www.grpc.io/about/#osp).\n\nBasic hardware requirements\n---------------------------\n\nBefore you begin, you'll need the following components:\n\n- A device running on one of the supported platforms, with internet connectivity\n- A microphone\n- A speaker\n\nSteps\n-----\n\nThe following sections are applicable to Python and the Raspberry Pi.\n\nIf you do not want to use Python, use the [integration guide](/assistant/sdk/guides/service/integrate#other-languages)\nto integrate the Google Assistant Service in other languages and on different\nplatforms.\n\n### Embed the Google Assistant\n\nThis section gets the Google Assistant Service sample working on your device:\n\n1. [Set Up Hardware and Network Access](/assistant/sdk/guides/service/python/embed/setup)\n2. [Configure and Test the Audio](/assistant/sdk/guides/service/python/embed/audio)\n3. [Configure a Developer Project and Account Settings](/assistant/sdk/guides/service/python/embed/config-dev-project-and-account)\n4. [Register the Device Model](/assistant/sdk/guides/service/python/embed/register-device)\n5. [Install the SDK and Sample Code](/assistant/sdk/guides/service/python/embed/install-sample)\n6. [Run the Sample Code](/assistant/sdk/guides/service/python/embed/run-sample)\n7. [Next Steps](/assistant/sdk/guides/service/python/embed/next-steps)\n\n### Extend the Google Assistant\n\nThis section extends the Google Assistant Service sample to include\n[Device Actions](/assistant/sdk/device-actions-overview):\n\n1. [Install Hardware](/assistant/sdk/guides/service/python/extend/install-hardware)\n2. [Register Traits](/assistant/sdk/guides/service/python/extend/register-device-traits)\n3. [Handle Commands](/assistant/sdk/guides/service/python/extend/handle-device-commands)\n4. [Add More Traits and Handlers](/assistant/sdk/guides/service/python/extend/add-trait-and-handler)\n5. [Register Custom Device Actions](/assistant/sdk/guides/service/python/extend/custom-actions)"]]