Giter Club home page Giter Club logo

ai-vtuber's Introduction

AI Vtuber

AI Vtuber是一个由ChatterBot驱动的虚拟主播,可以在Bilibili直播中与观众实时互动。它使用自然语言处理和文本转语音技术生成对观众问题的回答。

交流群:745682833

运行环境

  • Python 3.6+
  • Windows操作系统

安装依赖

在命令行中使用以下命令安装所需库:

pip install ChatterBot bilibili-api-python edge-tts

此外,还需要下载并安装mpv。在Windows操作系统上,也需要将 mpv.exe 添加到环境变量中。对于其他操作系统,请将其路径添加到系统 PATH 环境变量中。

如果ChatterBot安装报错,请前往 https://github.com/RaSan147/ChatterBot_update 安装新版本。下载下来输入python setup.py install即可

配置

  1. 打开 main.py 文件并修改 database_uri 变量的值以指定用于存储对话历史的SQLite数据库文件的路径。

使用

  1. 在命令行中运行以下命令启动程序:
python main.py
  1. 输入要连接的B站直播间编号。
  2. 按下Enter键开始监听弹幕流。

当有观众发送弹幕消息时,机器人将自动生成回复并将其转换为语音。声音文件将被保存并立即播放。

如何训练自己的AI?

  • 打开db.txt,写入你想要训练的内容,格式如下
问
答
问
答
  • 将文件重命名为db.txt
  • 在命令行中运行以下命令启动程序:
python train.py
  • 训练完的模型名叫db.sqlite3,直接双击main.py即可使用
  • 没有语料?快来加群下载吧!745682833

常见问题

  1. 提示缺少en-core-web-sm,打开终端输入
python -m spacy download en_core_web_sm
  1. 报错:no module named ‘spacy’解决办法
pip install spacy

TODO

  • 优化ChatterBot
    • 重写ChatterBot

许可证

MIT许可证。详情请参阅LICENSE文件。

ai-vtuber's People

Contributors

0x648 avatar voveer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.