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.
Loa, tốt nhất là USB (xem phần USB được đề xuất
hoặc giắc cắm 3,5mm)
Thẻ SD có NOOBS
được cài đặt sẵn. NOOBS là một trình cài đặt hệ điều hành chứa Raspbian theo mặc định
và đơn giản hoá việc thiết lập hệ điều hành.
Bạn cũng nên có bàn phím USB, chuột USB và màn hình có
Cáp HDMI. Những quy tắc này giúp đơn giản hoá quá trình thiết lập phần cứng ban đầu (và bắt buộc phải
cài đặt NOOBS).
Bây giờ, bạn sẽ thiết lập phần cứng và định cấu hình quyền truy cập mạng.
Kết nối phần cứng và định cấu hình quyền truy cập mạng
Kết nối micrô và loa với Raspberry Pi.
Lắp thẻ SD vào Raspberry Pi (với NOOBS hoặc Raspbian có
Đã tải máy tính).
Kết nối bàn phím USB, chuột USB và màn hình HDMI với Raspberry Pi. Nếu
bạn không có những tính năng này, lúc nào bạn cũng có thể
kết nối với Pi từ xa.
Sau khi định cấu hình quyền truy cập, bạn có thể kết nối với Raspberry Pi qua SSH
(không bắt buộc).
Định cấu hình ngày và giờ
Kiểm tra để đảm bảo rằng ngày và giờ đã được đặt chính xác trên thiết bị.
date
Kết nối với Raspberry Pi qua SSH (Không bắt buộc)
Để chạy các lệnh trên Raspberry Pi, bạn cần mở thiết bị đầu cuối
trên thiết bị này hoặc sử dụng kết nối SSH. Bạn phải sử dụng kết nối SSH từ
máy phát triển nếu bạn chưa kết nối màn hình, bàn phím và chuột
đến Raspberry Pi.
Trên Raspbian, mật khẩu mặc định cho người dùng pi là raspberry. Bạn nên
thay đổi mật khẩu này ngay lập tức (chạy passwd trong cửa sổ dòng lệnh trên Pi).
Sử dụng thiết bị đầu cuối hoặc phiên SSH bạn thiết lập ở bước này để nhập
trong phần còn lại của hướng dẫn này. Thư mục đang hoạt động cho cả hai là
/home/pi.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eThis guide details setting up a Raspberry Pi (3/Zero/Zero W) with audio input/output for a project.\u003c/p\u003e\n"],["\u003cp\u003eYou will need a Raspberry Pi, microphone, speaker, SD card (with NOOBS or Raspbian), and optionally a monitor, keyboard, and mouse for initial setup.\u003c/p\u003e\n"],["\u003cp\u003eThe guide involves configuring hardware, network access, date/time, and potentially connecting via SSH for remote access.\u003c/p\u003e\n"],["\u003cp\u003eEnsure your Raspberry Pi's SSH is enabled for remote command execution if not using a directly connected monitor, keyboard, and mouse.\u003c/p\u003e\n"],["\u003cp\u003eFollowing setup, the next step involves configuring and testing the audio functionality.\u003c/p\u003e\n"]]],["Users need a Raspberry Pi (3 or Zero), power supply, USB microphone, and speaker. An SD card with NOOBS or Raspbian is essential. Connect the hardware: microphone, speaker, and SD card to the Raspberry Pi. Additionally, plug in a USB keyboard, mouse, and HDMI monitor (optional). Connect to the network, and check/correct the date and time. Optionally, enable and connect via SSH using the default credentials (change the password). All subsequent terminal commands should be entered in the /home/pi directory.\n"],null,["# Set Up Hardware and Network Access\n\nThe content on this page is hardware-dependent. Please select from the following: \nRaspberry Pi 3 Other platforms\nBefore you begin, you'll need the following components:\n\n\u003cbr /\u003e\n\n- Raspberry Pi 3 Model B and power supply (see [recommended kit](https://www.adafruit.com/products/3334))\n\n\n | **Note:** You can also use a Raspberry Pi Zero (or Zero W).\n\n \u003cbr /\u003e\n\n- USB microphone (see [recommended](https://www.adafruit.com/product/3367))\n\n- Speaker, preferably USB (see recommended [USB](https://www.adafruit.com/products/3369)\n or [3.5mm-jack](https://www.sparkfun.com/products/14023))\n\n- An SD card with [NOOBS](https://www.raspberrypi.org/downloads/noobs/)\n pre-installed. NOOBS is an OS installer that contains Raspbian by default\n and simplifies OS setup.\n\n | **Note:** You can also [download Raspbian](https://www.raspberrypi.org/downloads/raspbian/) and [write](https://www.raspberrypi.org/documentation/installation/installing-images/linux.md) it to the SD card yourself.\n- You may also want to have a USB keyboard, USB mouse, and a monitor with an\n HDMI cable. These simplify initial hardware setup (and are required to\n install NOOBS).\n\nYou'll now set up the hardware and configure network access.\n\nConnect the hardware and configure network access\n-------------------------------------------------\n\n1. Connect the microphone and speaker to the Raspberry Pi.\n2. Insert the SD card into the Raspberry Pi (with NOOBS or Raspbian with Desktop already loaded).\n3. Connect a USB keyboard, USB mouse and HDMI monitor to your Raspberry Pi. If you don't have these, you can always [connect to the Pi remotely](/assistant/sdk/guides/service/python/embed/setup-headless).\n4. Plug in an ethernet cable or [connect to a Wi-Fi\n network](https://www.raspberrypi.org/documentation/configuration/wireless/desktop.md).\n\nAfter you configure access, you can connect to the Raspberry Pi via [SSH](#ssh)\n(optional).\n\nConfigure the date and time\n---------------------------\n\nCheck that the date and time are set correctly on the device. \n\n```\ndate\n```\n| **Note:** An incorrect date or time may cause SSL errors. Restart the device to automatically set the correct date and time from a time server or use the `date --s=\u003cSTRING\u003e` command to set them manually.\n\nConnect to the Raspberry Pi via SSH (Optional)\n----------------------------------------------\n\nTo run commands on the Raspberry Pi, you need to open the [terminal](https://www.raspberrypi.org/documentation/usage/terminal/)\non the device or use an SSH connection. You must use an SSH connection from your\ndevelopment machine if you do not have a monitor, keyboard, and mouse connected\nto the Raspberry Pi.\n\nMake sure [SSH is enabled](https://www.raspberrypi.org/documentation/remote-access/ssh/README.md)\non the Raspberry Pi. \n\n```\nssh pi@raspberry-pi-ip-address\n``` \n\n```\npassword: password-for-raspberry-pi\n```\n\nFor example: \n\n```\n$ ssh pi@192.168.1.101\npassword: raspberry\n```\n\nOn Raspbian, the default password for the `pi` user is `raspberry`. You should\nchange this password immediately (run `passwd` in a terminal on the Pi).\n\nUse the terminal or the SSH session you set up in this step to enter the\ncommands in the rest of this guide. The working directory for both is\n`/home/pi`.\n\nNext step\n---------\n\n[Configure and Test the Audio](/assistant/sdk/guides/service/python/embed/audio)"]]