Skip to content

Repository files navigation


🇻🇳 Tiếng Việt

Giới thiệu

AI VTuber nói tiếng Việt với độ tuỳ chỉnh cao.

Demo video

Features

  • Chơi được osu!
  • Tính cách có thể tuỳ chỉnh
  • Giọng TTS
  • Bộ nhớ 3 lớp giúp duy trì ngữ cảnh trò chuyện

Sử dụng

Yêu cầu

  • Đã cài Redis
  • Đã cài VB Audio Virtual Cable
  • Python 3.11

1. Cài dependencies

python -m venv .venv
.venv\Scripts\activate  # Windows
pip install -r requirements.txt

Nếu định chơi game thì chạy thêm lệnh sau:

pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128

2. Thiết lập môi trường

Điền thông tin vào file .env theo file hướng dẫn mẫu có sẵn.

3.1 Chơi game (osu!)

  • Mở game osu!
  • Mở tosu
  • Chỉnh file play-live.py cho đúng đường dẫn thư mục của file mô hình và game.
  • Chạy file play-live.py.
  • Mũi tên trái / phải: Tăng / giảm offset.
  • Phím 1 / 2 / 3: Thay đổi tần số cập nhật của mô hình 60hz / 90hz / 120hz (Recommend 90 hoặc 120).
  • Bật một beatmap bất kỳ và AI sẽ tự chơi.

3.2 Streaming

Mở VTube Studio, sau đó chạy các lệnh sau trong terminal tuỳ theo nhu cầu:

# Chỉ chạy model cơ bản
python src/main.py

# Có thêm giọng nói (TTS)
python src/main.py --tts

# Đọc được trạng thái game (cần mở tosu trước)
python src/main.py --game

# Đọc từ kênh chat YouTube
python src/main.py --youtube

# Nhận diện giọng nói (Speech-to-Text)
python src/main.py --stt

# Chạy đầy đủ tính năng
python src/main.py --tts --game --stt --youtube

# Chế độ Debug
python src/main.py --debug

Commands (Lệnh Terminal)

Khi đang chạy trong terminal, bạn có thể dùng các lệnh sau:

  • /quit hoặc /exit - Thoát chương trình.
  • /clear - Xoá lịch sử trò chuyện trong bộ nhớ ngắn hạn.
  • /log - Tổng hợp lại log chat trong cả ngày stream vào bộ nhớ dài hạn.

Khác

  • Hệ thống được test ở máy net với cấu hình RTX 4060, i5-12k, 32GB RAM. Nhưng máy yếu hơn chắc vẫn ổn.
  • Để hiện phụ đề khi stream: Trong OBS, thêm source Browser, trỏ đường dẫn vào file /obs/subtitles.html.
  • Chỉnh sửa tính cách nhân vật: Tạo file config/prompts/system_prompt.txt (tham khảo file example có sẵn).
  • Chỉnh CREATOR_YOUTUBE_IDCREATOR_DISPLAY_NAME trong config/settings.py thành thông tin của bạn.

Future

  • Tối ưu hoá nó lên (nếu được)
  • GUI hoá cái đống này
  • Tích hợp OpenClaw để nó rep người xem trên discord (?)
  • Kiếm cái model Live2D xịn hơn để test mấy cái action
  • subscribe to ペトラ
  • pls enjoy game

⬆️ Quay lại đầu trang / Back to top


🇬🇧 English

Introduction

A highly customizable Vietnamese-speaking AI VTuber.

Demo Video

Features

  • Can play osu! automatically.
  • Highly customizable personality.
  • Integrated TTS (Text-to-Speech) voice.
  • 3-layer memory architecture to maintain deep conversational context.

Usage

Prerequisites

  • Redis installed and running
  • VB Audio Virtual Cable installed
  • Python 3.11

1. Install Dependencies

python -m venv .venv
.venv\Scripts\activate  # Windows
pip install -r requirements.txt

If you plan to use the gaming feature, install PyTorch additionally:

pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128

2. Environment Setup

Fill in your .env file following the provided example/guide file.

3.1 Gaming (osu!)

  • Open osu!
  • Open tosu.
  • Edit play-live.py to ensure the file paths for the model and game directories are correct.
  • Run play-live.py.
  • Left / Right Arrow keys: Increase / decrease offset.
  • Keys 1 / 2 / 3: Change the model's refresh rate to 60Hz / 90Hz / 120Hz (90 or 120 is recommended).
  • Start any beatmap and the AI will play it automatically.

3.2 Streaming

Open VTube Studio, then run the following commands in your terminal depending on what you need:

# Base model only
python src/main.py

# With Text-to-Speech (TTS)
python src/main.py --tts

# With Game status reading (requires tosu to be open)
python src/main.py --game

# Read YouTube live chat
python src/main.py --youtube

# With Speech-to-Text (STT) for the creator
python src/main.py --stt

# Full features
python src/main.py --tts --game --stt --youtube

# Debug mode
python src/main.py --debug

Commands

While the terminal interface is running:

  • /quit or /exit - Exit the program.
  • /clear - Clear chat history in short-term memory.
  • /log - Summarize the entire stream's chat logs and save them into long-term memory.

Misc Notes

  • The system was tested on a cybercafe PC (RTX 4060, i5-12k, 32GB RAM), but weaker specs should probably be fine.
  • To display subtitles on stream: In OBS, add a Browser source and point it to the local file /obs/subtitles.html.
  • To edit the character's personality: Create/edit config/prompts/system_prompt.txt (refer to the provided example).
  • Change CREATOR_YOUTUBE_ID and CREATOR_DISPLAY_NAME in config/settings.py to your own details.

Future Plans

  • Optimize performance (if possible).
  • Build a GUI for all of this.
  • Integrate OpenClaw so it can reply to viewers on Discord (?).
  • Find a better Live2D model to test out different actions.
  • subscribe to ペトラ
  • pls enjoy game

⬆️ Back to top / Quay lại đầu trang

About

Hệ thống AI VTuber nói tiếng Việt có thể tuỳ chỉnh, ngoài ra cũng có thể chơi osu!.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages