Coder Social home page Coder Social logo

fahaxikim2 / vtbai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from newreport/vtbai

0.0 0.0 0.0 2.01 MB

ai live,ai vtb,bilibili live with chatgpt,基于chatgpt后端进行ai直播,配合obs和vts,需要图形化界面

License: GNU General Public License v3.0

Shell 0.48% Python 92.42% HTML 6.61% Batchfile 0.48%

vtbai's Introduction

Function in coding ....

  • VTS API 关键字触发表情
  • 语句情感推断触发 VTS 表情
  • Azure API TTS
  • Link CharacterAI 角色扮演最好的 AI
  • Multi link 联动
  • ChatGLM-6B 本地1
  • ChatterBot 本地2
  • Twitch & Youtube 平台支持

资源

从哔哩哔哩直播间抓取弹幕和礼物,接收后发送给 openai 官方的 chatgpt,等待 gpt 回调消息后使用 vits 进行 tts 推理,然后根据关键字/VTS API 触发表情和 playsound 播放语音, 播放时 vts 根据声音匹配口型

除非公司或大佬,非常不建议手搓 live2d,一是耗时,二是 vts 和 prprlive 配合关键字触发表情快捷键、VTS API 直播效果还可以

本直播流程仅在 win 下测试并通过,理论 linux 和 mac 在合适的 py 环境中也能使用,py 版本为 conda 3.10.10

注:有能者可以同理把老鼠和油管的扩展了,py 线程协程进程鲨我

工作流

blivedm(抓直播间信息)——>openai(猫娘对话)——>vits(tts 文本转语音)——>vts(语音转口型,快捷键触发表情)——>obs(推流)

功能

  • 支持 api 请求,扩展用,比如联动,语音转文字后请求即可 httt://127.0.0.1:8080?text=你好
  • 支持优先级:api>舰长>礼物>SC>弹幕,礼物和弹幕队列容量默认为5/10,满了自动剔除时间线最后的,SC、舰长没有容量限制

我的开发环境

  • CPU:5700G
  • GPU:核显
  • 主板:华硕 B550m TUF
  • 硬盘:凯侠 RC20
  • 内存:16*4(3133hz 金百达)
  • 电源:台达 300W
  • 机箱:X40 5.5L

主要速度慢在请求 openai 和 cpu 推理,用 gpu 会快很多,由于需要检测同音字敏感词以防爆房,故不能使用 SSE

obs、vts、雀魂 AI 全开的情况,推理时 cpu 负载约为 70%,理论讲 2k 内预算的丐中丐 5600G 也可以跑,功耗不超过 100W,ITX 都能跑,还要什么自行车,实际情况请用 n 卡 gpu 跑更好

搭建流程

请确保您已安装好 condaobsvtsvscode

请用 conda 新建 python 3.10 环境,launch 了 vscode

git clone -b 1.1-py https://github.com/newreport/vtbai.git
cd vtbai 
start.bat
# config\my_config.ini 填写房间号和 openai key
python main.py
# 弹幕,将 resource 中的 hmtl 拖到 obs 里

Star History Chart]

vtbai's People

Contributors

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