pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip install -r requirements.txt
```
### 3.Download ASR Model
Download [SenseVoiceSmall](https://modelscope.cn/models/iic/SenseVoiceSmall/resolve/master/model.pt) to
`model/SenseVoiceSmall`.
### 4.Configure Project
Modify the `Config.yaml` file to configure the various parameters required for this project. The default LLM uses
`Chatglmllm`, you need to configure the key to start.
The default TTS uses `Edgetts`. This does not require configuration. If you need to replace it with` TTS`, you need to
configure the key.
Configuration description: This is the default component of each function, such as LLM default to use the `Chatglmllm`
model. If you need to switch the model, it is the corresponding name.
```
selected_module:
ASR: FunASR
VAD: SileroVAD
LLM: ChatGLMLLM
TTS: EdgeTTS
```
For example, modify the components used by `llm`, depending on which` llm` supports this project, as follows, it
supports `Deepseekllm` and` Chatglmllm`. You are modified to the corresponding LLM in `selectd_module`
```
LLM:
DeepSeekLLM:
...
ChatGLMLLM:
...
DifyLLM:
...
```
Some services, for example, if you use the TTS` of the `dify` and` bean bags, you need a key, remember to add the
configuration file!
### 5.Run the Project
Run the Project
```
python app.py
```
You'll see the WebSocket endpoint in logs:
```
2025-xx-xx xx:51:59,492 - core.server - INFO - Server is running at ws://192.168.1.25:8000
2025-xx-xx xx:51:59,516 - websockets.server - INFO - server listening on 0.0.0.0:8000
```
Among them, the `ws://192.168.1.25:8000` is the interface address provided by this project. Of course, your own machine
is different from mine. Remember to find your own address.
### 6.Compile ESP32 Firmware
1. Download `xiaozhi-esp32` project, configure the project environment according to this
tutorial [" Windows builds ESP IDF 5.3.2 Development Environment and Compiles Xiaozhi "](https://icnynnzcwou8.feishu.cn/wiki/JEYDwTTALi5s2zkGlFGcDiRknXf)
Cure
2. Open the `xiaozhi-esp32/main/kconfig.projbuild` file, find the content of the` websocket_url``default`, change the
` wss: // api.tenclass.net` to your own address, such as
Before modification:
```
config WEBSOCKET_URL
depends on CONNECTION_TYPE_WEBSOCKET
string "Websocket URL"
default "wss://api.tenclass.net/xiaozhi/v1/"
help
Communication with the server through websocket after wake up.
```
After modification (example):
```
config WEBSOCKET_URL
depends on CONNECTION_TYPE_WEBSOCKET
string "Websocket URL"
default "ws://192.168.1.25:8000/xiaozhi/v1/"
help
Communication with the server through websocket after wake up.
```
3. Configure build settings:
```
# The terminal command line enters the root directory of xiaozhi-esp32
cd xiaozhi-esp32
# For example, the board I use is ESP32S3, so the compile target is ESP32S3. If your board is other models, please replace it with the corresponding model