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.
Khắc phục sự cố liên quan đến Thư viện Trợ lý Google
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.
Cài đặt/nâng cấp thư viện
Bạn nhận được một thông báo lỗi tương tự như E: Unable to locate package python3-venv
trong khi cố gắng định cấu hình một môi trường ảo Python mới.
Trên các phiên bản Ubuntu cũ hơn, gói meta cho phiên bản ảo Python 3
(python3-venv) không có sẵn. Sử dụng phiên bản đủ điều kiện
thay vào đó:
sudo apt-get install python3-dev python3.4-venv
Bạn nhận được một thông báo lỗi tương tự như No matching distribution found
hoặc <wheel> is not a supported wheel on this platform.
Kiểm tra cấu trúc phần cứng:
uname -a Linux raspberrypi 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux
Thư viện chỉ được hỗ trợ trên phần cứng với linux-armv7l và linux-x86_64
các kiến trúc khác nhau. Đối với các phần cứng khác, hãy sử dụng Dịch vụ Trợ lý Google
thay thế.
Vấn đề về thông tin đăng nhập
Khi bạn cố gắng tạo thông tin xác thực bằng công cụ uỷ quyền, công cụ này sẽ nhắc
bạn truy cập một URL rồi đăng nhập vào Tài khoản Google của mình. Sau đó, trang này sẽ hiển thị
(ví dụ: "Đã xảy ra lỗi").
Trợ lý trả lời Tôi không biết cách trợ giúp việc đó hoặc Tôi không biết
hiểu.
Xác minh rằng giọng nói của bạn được nhận dạng chính xác. Kiểm tra mã mẫu
cho bản chép lời của yêu cầu của người dùng. Bạn cũng có thể xem
hoạt động của tôi. Bạn
có thể phát âm thanh mà Trợ lý nhận được để kiểm tra chất lượng âm thanh
vấn đề. Nếu bạn nghe thấy tiếng ồn quá mức hoặc nếu âm thanh bị méo, hãy kiểm tra
micrô của bạn được định cấu hình đúng cách hay chưa hoặc thử một
micrô.
Vấn đề về đặc điểm
Trợ lý không nhận ra một đặc điểm mà bạn đã thêm vào mô hình.
Nếu bạn đã tạo phiên bản thiết bị cho một mẫu, thì phiên bản thiết bị đó sẽ không
tự động cập nhật khi mô hình của mô hình bị người dùng khác thay đổi. Bạn cần
đăng ký lại phiên bản thiết bị theo cách thủ công bằng công cụ dòng lệnh đăng ký
hoặc API REST.
Bạn có thể tìm thấy
mã phiên bản thiết bị
trong kết quả của mẫu.
Các vấn đề về Hành động trên thiết bị
Trợ lý Google sẽ trả lời và cho biết rằng ứng dụng của bạn không được hỗ trợ trên thiết bị
thiết bị.
Trong Bảng điều khiển Actions, bạn
có thể đặt chức năng nền tảng của ứng dụng Trợ lý. Nếu bạn đặt màn hình
đầu ra bắt buộc, thì các thao tác tuỳ chỉnh của bạn sẽ không hoạt động. Chiến dịch
SDK Trợ lý hiện không hỗ trợ các tính năng trên màn hình.
Vấn đề về cụm từ kích hoạt
Trợ lý có vẻ như không phản hồi với các câu bắt đầu bằng Ok Google hoặc
Ok Google.
Nếu bạn vẫn nhận ra ít hoặc không nhận ra giọng nói của mình, hãy thử hiệu chỉnh
độ nhạy của micrô:
Chấm dứt (Ctrl+C) mọi mã mẫu hiện đang chạy.
Chạy lệnh sau:
export ASSISTANT_MIC_SENSITIVITY=-6
Chạy mã mẫu rồi thử lại. Quay lại bước 1, nhưng tiếp tục giảm
giá trị ASSISTANT_MIC_SENSITIVITY trong các khoảng -6 (ví dụ: -6, -12,
-18, -24...) cho đến khi bạn thấy tính năng nhận dạng giọng nói là tối ưu. Nếu bạn
chuyển đến -60, hãy kiểm tra micrô.
Vấn đề về chuông báo và đồng hồ hẹn giờ
Trợ lý không làm theo các lệnh bằng lời nói (ví dụ: tạm dừng
hoặc dừng đồng hồ hẹn giờ).
Đây là vấn đề nếu bạn cài đặt nút StartStop
hoặc tính năng OnOff được bật cho
mẫu thiết bị cụ thể. Xoá đặc điểm này khỏi mẫu thiết bị và lời nói
các lệnh sẽ hoạt động.
Vấn đề khi phát podcast và tin tức
Trợ lý không tuân theo các lệnh phát (ví dụ: tạm dừng)
hoặc dừng podcast).
Đây là vấn đề nếu bạn cài đặt nút StartStop
hoặc bật tính năng OnOff cho một mã cụ thể
mẫu thiết bị của bạn. Xoá trait này khỏi mẫu thiết bị và các lệnh phát
sẽ mang lại hiệu quả.
Vấn đề về quá trình phát sóng
Trợ lý không thể truyền tin nhắn từ thiết bị này sang thiết bị khác.
Hãy nhớ đặt vị trí của thiết bị trong ứng dụng Trợ lý Google.
Cả hai thiết bị phải có cùng địa chỉ trong ứng dụng.
Hỗ trợ
Bạn vẫn gặp sự cố? Hãy xem trang Hỗ trợ của chúng tôi.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eThe Google Assistant Library for Python is deprecated; use the Google Assistant Service instead.\u003c/p\u003e\n"],["\u003cp\u003eThe library is supported only on hardware with linux-armv7l and linux-x86_64 architectures.\u003c/p\u003e\n"],["\u003cp\u003eFor credential issues, ensure the Google Assistant API is enabled and the OAuth consent screen is configured.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshoot voice recognition by checking audio quality, microphone configuration, and user request transcript.\u003c/p\u003e\n"],["\u003cp\u003eFor device action issues, avoid requiring screen output in the Actions Console, as the SDK doesn't currently support it.\u003c/p\u003e\n"]]],["The Google Assistant Library for Python is deprecated; use the Google Assistant Service instead. Common issues include: virtual environment errors (install `python3-dev python3.4-venv`), hardware architecture mismatch (only `linux-armv7l` and `linux-x86_64` supported), credential errors (enable the API and OAuth), permission problems (set activity controls), voice recognition problems (check audio quality and microphone), trait issues (register traits and re-register devices), device action problems (don't require screen output), hotword issues (adjust mic sensitivity), and issues with certain traits (remove `StartStop` and `OnOff` traits).\n"],null,["# Troubleshooting the Google Assistant Library\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\nInstalling/upgrading the library\n--------------------------------\n\nYou get an error message similar to `E: Unable to locate package python3-venv`\nwhile trying to configure a new Python virtual environment.\n\n- On older versions of Ubuntu, the meta package for the Python 3 virtual\n environment (`python3-venv`) is not available. Use a fully-qualified version\n instead:\n\n ```\n sudo apt-get install python3-dev python3.4-venv\n ```\n\nYou get an error message similar to `No matching distribution found`\nor `\u003cwheel\u003e is not a supported wheel on this platform`.\n\n- Check the hardware architecture:\n\n ```\n uname -a\n Linux raspberrypi 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux\n ```\n\n \u003cbr /\u003e\n\n The library is only supported on hardware with linux-armv7l and linux-x86_64\n architectures. For other hardware, use the [Google Assistant Service](/assistant/sdk/overview#sdk_components)\n instead.\n\nCredentials issues\n------------------\n\nWhen trying to generate credentials with the authorization tool, the tool prompts\nyou to visit a URL and sign in to your Google account. The page then displays an\nerror message (for example, \"Something went wrong\").\n\n- Make sure you enabled the Google Assistant API and configured the OAuth consent screen in [Configure a Developer Project and Account Settings](/assistant/sdk/guides/library/python/embed/config-dev-project-and-account#config-dev-project).\n\nPermissions issues\n------------------\n\nThe Google Assistant responds *Actually, there are some basic settings that need\nyour permission first...*\n\n- [Set activity controls](/assistant/sdk/guides/activity-controls) for the account that you used when setting the authorization code.\n\nVoice recognition issues\n------------------------\n\nAssistant responds *I don't know how to help with that* or *I don't\nunderstand.*\n\n- Verify that your voice was recognized properly. Check the sample code output for a transcript of the user request. You can also look at [my activity](https://myactivity.google.com/myactivity?restrict=vaa). You can play the audio received by the Assistant to check for audio quality issues. If you hear excessive noise or if the audio is distorted, check that your microphone is configured properly or try a different microphone.\n\nTrait issues\n------------\n\nAssistant does not recognize a trait that you added to a model.\n\n- Make sure the trait was added to the model\n (see [Register Traits for the\n Device](/assistant/sdk/guides/library/python/extend/register-device-traits)).\n\n- If you generated a device instance for a model, the device instance will **not**\n automatically update when its model is changed by other users. You need to\n manually re-register the device instance using the [registration command line tool](/assistant/sdk/reference/device-registration/device-tool#register-device)\n or the [REST API](/assistant/sdk/reference/device-registration/register-device-manual#register-instance).\n You can find the\n [device instance ID](/assistant/sdk/guides/library/python/embed/run-sample#get-device-id)\n in the output of the sample.\n\nDevice Actions issues\n---------------------\n\nThe Google Assistant responds saying that your app is not supported on your\ndevice.\n\n- In the [Actions Console](https://console.actions.google.com/), you can set the surface capabilities of your Assistant app. If you set screen output to be required, your custom actions will not function. The Google Assistant SDK does not support screen capabilities at this time.\n\nHotword issues\n--------------\n\nAssistant does not seem to respond to sentences that begin with *Ok Google* or\n*Hey Google*.\n\n- If you still get little to no recognition of your voice, try calibrating\n your microphone sensitivity:\n\n 1. Terminate (Ctrl+C) any sample code that is currently running.\n 2. Run the following command: \n\n ```\n export ASSISTANT_MIC_SENSITIVITY=-6\n ```\n 3. Run the sample code and try again. Go back to step 1, but keep lowering the `ASSISTANT_MIC_SENSITIVITY` value in intervals of -6 (e.g., -6, -12, -18, -24...) until you find that voice recognition is optimal. If you get to -60, check your microphone.\n\nAlarms and timers issues\n------------------------\n\nThe Assistant does not follow verbal commands (for example, pausing\nor stopping a timer).\n\n- This is an issue if you have the [StartStop](/assistant/sdk/reference/traits/startstop) or [OnOff](/assistant/sdk/reference/traits/onoff) trait enabled for a given device model. Remove this trait from the device model and verbal commands will work.\n\nPodcast and news playback issues\n--------------------------------\n\nThe Assistant does not follow playback commands (for example, pausing\nor stopping a podcast).\n\n- This is an issue if you have the [StartStop](/assistant/sdk/reference/traits/startstop) or [OnOff](/assistant/sdk/reference/traits/onoff) trait enabled for a given device model. Remove this trait from the device model and playback commands will work.\n\nBroadcast issues\n----------------\n\nThe Assistant cannot broadcast messages from one device to the other.\n\n- Make sure to set the device location in the Google Assistant [app](/assistant/sdk/reference/assistant-app/assistant-settings). Both devices must have the same address in the app.\n\nSupport\n-------\n\nStill having trouble? See our [Support](/assistant/sdk/support) page."]]