Skip to content

QuecPython/AIChatBot-Volcengine-webRTC

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:

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:

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:

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:

  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

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages