Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

8 Commits

Repository files navigation

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:

SeriesModel
EC600MEC600MCN_LE
EC800MEC800MCN_LE, EC800MCN_GB
EG810MEG810MCN_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:

Installation

  1. Clone the repository:

    git clone https://github.com/QuecPython/AIChatBot-Volcengine-webRTC.git
    cd AIChatBot-Volcengine-webRTC
  2. Install USB driver

  3. 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.config interface.

Running the Application

  1. Hardware connection: Connect the hardware as shown in the following diagram:

    1. Connect the speaker to the pin headers marked SPK+ and SPK- in the diagram.

    2. Connect the LCD screen to the pin headers marked with LCD.

    3. Insert an available Nano SIM card in the indicated position.

    4. Connect the antenna to the antenna connector marked LTE.

    5. Use a Type-C data cable to connect the development board to the computer.

  2. 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 code folder into the module's file system, preserving the directory structure.

  3. Run the application:

    • Select the File tab.

    • Select the ai_main.py script.

    • Right-click and select Run or use the Run shortcut button to execute the script.

  4. Reference runtime logs:

importexample>>>example.exec('/usr/ai_main.py')
windowshowovervolume: 6>>>ltenetworknormalaitaskrunning# Press KEY1 to enter the agentrtc_queuekeyevent1startrtcTIKTOK_RTC_EVENT_STARTTIKTOK_RTC_EVENT_TTS_TEXTHelloTIKTOK_RTC_EVENT_TTS_TEXTHellothereTIKTOK_RTC_EVENT_TTS_TEXTIsthereanythingTIKTOK_RTC_EVENT_TTS_TEXTIsthereanythingITIKTOK_RTC_EVENT_TTS_TEXTIsthereanythingIcanTIKTOK_RTC_EVENT_TTS_TEXTIsthereanythingIcanhelpTIKTOK_RTC_EVENT_TTS_TEXTIsthereanythingIcanhelpyouTIKTOK_RTC_EVENT_TTS_TEXTIsthereanythingIcanhelpyouwithTIKTOK_RTC_EVENT_TTS_TEXTIsthereanythingIcanhelpyouwith?
# Press KEY2 to exit the agentrtc_queuekeyevent2stoprtc

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:

  1. Fork this repository.

  2. Create a new branch (git checkout -b feature/your-feature).

  3. Commit your changes (git commit -m 'Add your feature').

  4. Push to the branch (git push origin feature/your-feature).

  5. 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.

About

An AI chat bot based on volcengine's webRTC protocol.

Topics

Resources

Stars

36 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages