QuecPython introduces an AI chatbot solution based on Douyin WebRTC. This solution utilizes the Volcano RTC library and requires firmware that supports TiktokRTC functionality.
The following module models support this feature:
| Series | Models |
|---|---|
| EC600M | EC600MCN_LE |
| EC800M | EC800MCN_LE, EC800MCN_GB |
| EG810M | EG810MCN_GA_VOLTE |
- Supports agent switching.
- Supports voice tone switching.
- Supports ASR subtitles.
- Supports TTS subtitles.
- Supports voice interruption/barge-in.
- Supports server address switching.
- Supports voice wake-up.
- Uses Python for easy secondary development.
Before you begin, ensure you have the following prerequisites:
-
Hardware:
-
EC600MCNLE QuecPython Standard Development Board (including antenna, Type-C cable, etc.)
- View the development board's schematic and silkscreen documents.
- Purchase link on Quectel Mall
-
Computer (Windows 7, Windows 10, or Windows 11)
-
LCD Display
- Model: ST7789
- Resolution: 240×240
- Purchase link on Quectel Mall
-
Speaker
- Any 2-5W power speaker will suffice
- Purchase link on Quectel Mall
-
-
Software:
- QuecPython module USB driver: QuecPython_USB_Driver_Win10_ASR
- Debugging tool QPYcom
- QuecPython firmware
- Python text editor (e.g., VSCode, Pycharm)
-
Clone the repository:
git clone https://github.com/QuecPython/AIChatBot-Volcengine-webRTC.git cd AIChatBot-Volcengine-webRTC -
Install the USB driver.
-
Flash the firmware: Follow the instructions to flash the firmware onto the development board.
Note: The Volcano dialogue token in the firmware is for temporary testing and may be revoked at any time. For a better experience, contact Quectel technical support. If you have your own Volcano token, you can configure it directly using the
tiktok.configinterface.
- Connect the hardware: Follow the diagram below for hardware connections:
- Connect the speaker to the pins labeled
SPK+andSPK-. - Connect the LCD screen to the pins labeled
LCD. - Insert a usable Nano SIM card in the designated slot.
- Connect the antenna to the antenna connector labeled
LTE. - Use a Type-C cable to connect the development board to your computer.
- Connect the speaker to the pins labeled
- Download the code to the device:
- Launch the QPYcom debugging tool.
- Connect the data cable to the computer.
- Press the PWRKEY button on the development board to power on the device.
- Follow the instructions to import all files from the
codefolder into the module's file system, preserving the directory structure.
- Run the application:
- Select the
Filetab. - Choose the
ai_main.pyscript. - Right-click and select
Runor use theRunshortcut button to execute the script.
- Select the
- Reference run log:
import example >>> example.exec('/usr/ai_main.py') window show over volume: 6 >>> lte network normal ai task running # Press KEY1 to enter the agent rtc_queue key event 1 start rtc TIKTOK_RTC_EVENT_START TIKTOK_RTC_EVENT_TTS_TEXT Hello TIKTOK_RTC_EVENT_TTS_TEXT Hello, how TIKTOK_RTC_EVENT_TTS_TEXT Hello, how can TIKTOK_RTC_EVENT_TTS_TEXT Hello, how can I TIKTOK_RTC_EVENT_TTS_TEXT Hello, how can I help TIKTOK_RTC_EVENT_TTS_TEXT Hello, how can I help you TIKTOK_RTC_EVENT_TTS_TEXT Hello, how can I help you today? # Press KEY2 to exit the agent rtc_queue key event 2 stop rtcsolution-AI/ ├── code/ │ ├── ai_main.py │ ├── datetime.py │ ├── ... │ └── img/ │ ├── battery/ │ │ ├── bat_00.png │ │ ├── bat_01.png │ │ └── ... │ ├── signal/ │ │ ├── signal_00.png │ │ ├── signal_01.png │ │ └── ... │ ├── image1.png │ ├── image2.png │ └── ... ├── examples/ │ └── examples_ai.py ├── docs/zh/media/ │ └── wire_connection.jpg ├── EC600MCNLER06A01M08_OCPU_QPY_TEST0213.zip ├── LICENSE ├── readme.md └── readme_zh.md We welcome contributions to improve this project! Follow these steps to contribute:
- Fork this repository.
- Create a new branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -m 'Add your feature'). - Push to the branch (
git push origin feature/your-feature). - Open a Pull Request.
This project is licensed under the Apache License. See the LICENSE file for details.
If you have any questions or need support, refer to the QuecPython documentation or open an issue in this repository.