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.
Trang này chứa các đề xuất về cách cung cấp dữ liệu lời nói cho API Trợ lý Google. Những nguyên tắc này được thiết kế để mang lại hiệu quả và độ chính xác cao hơn cũng như thời gian phản hồi hợp lý từ dịch vụ.
Xử lý trước âm thanh
Tốt nhất là bạn nên cung cấp âm thanh rõ nhất có thể bằng cách sử dụng micrô có chất lượng tốt và được đặt ở vị trí hợp lý. Tuy nhiên, việc áp dụng cách xử lý tín hiệu giảm tiếng ồn cho âm thanh trước khi gửi đến dịch vụ thường làm giảm độ chính xác của quá trình nhận dạng. Dịch vụ này được thiết kế để xử lý âm thanh ồn.
Để có bức ảnh đẹp nhất, hãy làm như sau:
Đặt micrô càng gần người dùng càng tốt, đặc biệt khi có tạp âm.
Tránh sử dụng đoạn âm thanh.
Không sử dụng chế độ kiểm soát khuếch đại tự động (AGC).
Bạn nên tắt mọi tính năng xử lý giảm tiếng ồn.
Lý tưởng nhất là:
Bạn phải hiệu chỉnh mức âm thanh để tín hiệu đầu vào không bị cắt bớt, và mức âm thanh cao nhất của tiếng nói đạt khoảng -20 đến -10 dBFS.
Thiết bị phải có biên độ gần đúng so với đặc điểm tần số (+- 3 dB 100 Hz đến 8000 Hz).
Tổng độ biến dạng sóng hài phải nhỏ hơn 1% từ 100 Hz đến 8000 Hz ở mức đầu vào 90 dB SPL.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eThe Google Assistant API is designed to handle noisy audio, so noise reduction processing should be disabled prior to sending audio.\u003c/p\u003e\n"],["\u003cp\u003eFor optimal performance, position the microphone near the user, avoid audio clipping and automatic gain control, and calibrate audio levels to peak between -20 to -10 dBFS.\u003c/p\u003e\n"],["\u003cp\u003eDevices used for audio input should ideally have a flat frequency response and minimal harmonic distortion.\u003c/p\u003e\n"],["\u003cp\u003e\u003cstrong\u003eWarning:\u003c/strong\u003e The Google Assistant Library for Python is deprecated; use the Google Assistant Service instead.\u003c/p\u003e\n"]]],["The Google Assistant Library for Python is deprecated; use the Google Assistant Service instead. For optimal audio input, provide clean audio from a high-quality, well-positioned microphone. Disable noise reduction and automatic gain control. Position the microphone close to the user and avoid audio clipping. Calibrate audio levels to avoid clipping, with peak levels around -20 to -10 dBFS. Aim for a flat amplitude response (+- 3 dB from 100 Hz to 8000 Hz) and total harmonic distortion under 1%.\n"],null,["# Best Practices for Audio\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\nThis page contains recommendations on how to provide speech data to the\nGoogle Assistant API. These guidelines are designed for greater efficiency\nand accuracy as well as reasonable response times from the service.\n\nAudio pre-processing\n--------------------\n\nIt's best to provide audio that is as clean as possible by using a good quality\nand well-positioned microphone. However, applying noise-reduction signal\nprocessing to the audio before sending it to the service typically reduces\nrecognition accuracy. The service is designed to handle noisy audio.\n\nFor best results:\n\n- Position the microphone as close to the user as possible, particularly when background noise is present.\n- Avoid audio clipping.\n- Do not use automatic gain control (AGC).\n- All noise reduction processing should be disabled.\n\nIdeally:\n\n- The audio level should be calibrated so that the input signal does not clip, and peak speech audio levels reach approximately -20 to -10 dBFS.\n- The device should exhibit approximately \"flat\" amplitude versus frequency characteristics (+- 3 dB 100 Hz to 8000 Hz).\n- Total harmonic distortion should be less than 1% from 100 Hz to 8000 Hz at 90 dB SPL input level."]]