MikuAI/README.md
2024-08-17 05:01:35 +00:00

1.4 KiB

MikuAI

Backend for Hatsune Miku discord bot, capable of text generation and voice changing.

RVC code is adapted from AICoverGen.

The model used for text generation is Meta-Llama-3-8B-Instruct-abliterated-v3 with a custom LoRA trained on group chat messages, both of which are downloaded from Huggingface. The Literally Every Hatsune Miku Voicebank model is used for voice synthesis, and is included with this repo.

Requirements

Modern NVIDIA GPU with 8+ GB of VRAM, as well as 8+ GB of CPU RAM

Setup

Install Anaconda/Miniconda3/Mamba and set up an environment with Python 3.10.

Set up Pytorch followed by Unsloth.

Install the ffmpeg and sox packages, you may have to get ffmpeg from conda-forge if it complains about missing shared libraries when you try to run it.

Run pip -r requirements.txt to get the rest of the dependencies. Then, copy config_example.py to config.py and change the settings accordingly.

Start the web server using uvicorn api:app --host=0.0.0.0 --port=8000. You can test the endpoints at http://localhost:8000/docs.