GitHub - QuecPython/AIChatBot-Volcengine-webRTC: An AI chat bot based on volcengine's webRTC protocol.
QuecPython AI ChatBot English Documentation
Table of Contents
Introduction
QuecPython has launched an AI chatbot solution based on Doubao webRTC. This solution is based on Volcengine RTC library and can only use firmware that supports TiktokRTC functionality.
The module models supporting this feature are as follows:
| Series | Model |
|---|---|
| EC600M | EC600MCN_LE |
| EC800M | EC800MCN_LE, EC800MCN_GB |
| EG810M | EG810MCN_GA_VOLTE |
Features
-
Support for agent switching.
-
Support for voice timbre switching.
-
Support for ASR subtitles.
-
Support for TTS subtitles.
-
Support for voice interruption/barge-in.
-
Support for server address switching.
-
Support for voice wake-up.
-
Written in Python language, facilitating secondary development.
Quick Start
Prerequisites
Before you begin, please ensure you have the following prerequisites:
-
Hardware:
-
EC600MCNLE QuecPython Standard Development Board (including antenna, Type-C data cable, etc.)
-
Click to view the development board Schematic and Silkscreen Diagram documentation.
-
-
-
Computer (Windows 7, Windows 10, or Windows 11)
-
LCD Display
-
Model: ST7789
- Resolution: 240×240
-
Speaker
-
Any speaker with 2-5W power will work
-
-
-
Software:
-
USB driver for QuecPython module: QuecPython_USB_Driver_Win10_ASR
-
Debugging tool QPYcom
-
QuecPython Firmware
-
Installation
-
Clone the repository:
git clone https://github.com/QuecPython/AIChatBot-Volcengine-webRTC.git cd AIChatBot-Volcengine-webRTC -
Install USB driver
-
Flash firmware: Follow the instructions to flash the firmware onto the development board.
Note: The Volcengine conversation token in the firmware is for temporary testing purposes and may be revoked at any time. For usage experience, please contact Quectel technical support. If you have your own Volcengine token, you can directly configure it through the
tiktok.configinterface.
Running the Application
-
Hardware connection: Connect the hardware as shown in the following diagram:
-
Connect the speaker to the pin headers marked
SPK+andSPK-in the diagram. -
Connect the LCD screen to the pin headers marked with
LCD. -
Insert an available Nano SIM card in the indicated position.
-
Connect the antenna to the antenna connector marked
LTE. -
Use a Type-C data cable to connect the development board to the computer.
-
-
Download 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 start the device.
-
Follow the instructions to import all files in the
codefolder into the module's file system, preserving the directory structure.
-
-
Run the application:
-
Select the
Filetab. -
Select the
ai_main.pyscript. -
Right-click and select
Runor use theRunshortcut button to execute the script.
-
-
Reference runtime logs:
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 there TIKTOK_RTC_EVENT_TTS_TEXT Is there anything TIKTOK_RTC_EVENT_TTS_TEXT Is there anything I TIKTOK_RTC_EVENT_TTS_TEXT Is there anything I can TIKTOK_RTC_EVENT_TTS_TEXT Is there anything I can help TIKTOK_RTC_EVENT_TTS_TEXT Is there anything I can help you TIKTOK_RTC_EVENT_TTS_TEXT Is there anything I can help you with TIKTOK_RTC_EVENT_TTS_TEXT Is there anything I can help you with? # Press KEY2 to exit the agent rtc_queue key event 2 stop rtc
Directory Structure
solution-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
Contributing
We welcome contributions to improve this project! Please 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.
License
This project uses the Apache license. Please refer to the LICENSE file for details.
Support
If you have any questions or need support, please refer to the QuecPython Documentation or open an issue in this repository.