Code Monkey home page Code Monkey logo

rvc-studio's Introduction

โš ๏ธ The main branch is bleeding edge: Expect frequent updates and many breaking changes after every commit

RVC Studio

This project provides a comprehensive platform for training RVC models and generating AI voice covers. Use the app to download the required files before using or manually download them here: https://huggingface.co/datasets/SayanoAI/RVC-Studio/tree/main

Features

  • Youtube music downloader: download any music video from Youtube as an mp3 file with just one click.
  • 1-click AI song covers: easily create AI song covers using RVC.
  • RVC Model fine-tuning: fine-tune an RVC model to mimic any voice you want using your own data.
  • 1-click TTS using RVC model: convert any text to speech using the fine-tuned VC model with just one click.
  • Built-in tensorboard: You can monitor the training progress and performance of your VC model using a built-in tensorboard dashboard.
  • LLM integration: chat with your RVC model in real time using popular LLMs.
  • Auto-Playlist: let your RVC model sing songs from your favourite playlist.

Planned Features

  • Demucs: Meta's vocals and instrumental music source separation.
  • Audio-postprocessing: You can enhance the quality of your generated songs by adding reverbs, echos, etc.
  • TTS using cloud API: use a cloud-based text-to-speech service to generate high-quality and natural-sounding speech from any text.
  • Real-time VC interface: convert your voice using your favourite RVC model.

Requirements

  • Python 3.6 or higher (developed and tested on v3.8.17)
  • Pip
  • Virtualenv or conda package manager

Easy Install

  1. Clone this repository or download the zip file and extract it.
  2. Double-click "conda-installer.bat" to install the latest version of conda package manager
  3. Double-click "conda-start.bat" (if you skipped step 2.)

Manual Installation

  1. Clone this repository or download the zip file.
  2. Navigate to the project directory and create a virtual environment with the command virtualenv venv.
  3. Activate the virtual environment with the command source venv/bin/activate on Linux/Mac or venv\Scripts\activate on Windows. Or use conda create -n RVC-Studio & conda activate RVC-Studio if you're using conda package manager.
  4. Install the required packages with the command pip install -r requirements.txt.
  5. Run the streamlit app with the command streamlit run Home.py.

Or run it in Google Colab

Instructions for Inference page

  1. Download all the required models on the webui page or here: https://huggingface.co/datasets/SayanoAI/RVC-Studio/tree/main
  2. Put your favourite songs in the ./songs folder
  3. Navigate to "RVC Server" page and start the server
  4. Navigate to "Inference" page and press "Refresh Data" button
  5. Select a song (only wav/flac/ogg/mp3 are supported for now)
  6. Select a voice model (put your RVC v2 models in ./models/RVC/ and index file in ./models/RVC/.index/)
  7. Choose a vocal extraction model (preprocessing model is optional)
  8. Click "Save Options" and "1-Click VC" to get started

Instructions for Chat page

Chat functionality has been migrated to RVC-Chat.

Feel free to use larger versions of these models if your computer can handle it. (you will have to build your own config)

Dockerize

Run docker compose up --build in the main project folder.

Known issue: Tensorboard doesn't work inside a docker container. Feel free to submit a PR if you know a solution. fixed in commit 8b720936b4dab347cba0e4a791330fb533bfdf1d

FAQs

Disclaimer

This project is for educational and research purposes only. The generated voice overs are not intended to infringe on any copyrights or trademarks of the original songs or text. The project does not endorse or promote any illegal or unethical use of the generative AI technology. The project is not responsible for any damages or liabilities arising from the use or misuse of the generated voice overs.

Credits

This project uses code and AI models from the following repositories:

We thank all the authors and contributors of these repositories for their amazing work and for making their code and models publicly available.

rvc-studio's People

Contributors

blaise-tk avatar dnoiz1 avatar isaactay avatar sayanoai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rvc-studio's Issues

Error while entering the inference tab

2023-09-23 18:23:43.056 Uncaught app exception
Traceback (most recent call last):
File "E:\conda-envs\RVC-Studio\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "E:\RVC-Studio\pages\1_Inference.py", line 166, in
disabled=not (state.uvr5_params.model_paths and state.input_audio_name and state.model_name)):
AttributeError: 'NoneType' object has no attribute 'model_paths'

I already reinstalled and it still doesn't work.
All other tabs work fine.
imagen_2023-09-23_182735185

[BUG] Inference tab -> Scan models doesn't work

Description
The button for models scan(Refresh data in Inference tab) doesn't do anything.
image

The scan doesn't work with or without the RVC server. The RVC server, however, can see the model right after the start:
{"status":"OK","rvc":["repetur"],"uvr":[],"denoise":[]} # output at http://localhost:5555/, where repetur is model name

The model and index are inside models/RVC folder(index is in models/RVC/.index), the model was trained with RVC-Studio.

No errors are being thrown in the console after pushing the button. The only errors i've encountered during my user journey from Home tab to training and up to infer are:

Invalid URL 'None': No scheme supplied. Perhaps you meant https://None?
Invalid URL 'None': No scheme supplied. Perhaps you meant https://None?
Invalid URL 'None/preprocess': No scheme supplied. Perhaps you meant https://None/preprocess?
Invalid URL 'None/postprocess': No scheme supplied. Perhaps you meant https://None/postprocess?
'<' not supported between instances of 'NoneType' and 'int'
'<' not supported between instances of 'NoneType' and 'int'
'<' not supported between instances of 'NoneType' and 'int'

but as far as i can tell they do not interfere with anything and the model training(which is the only thing i've done so far besides downloading hubert, ffmpeg, etc.) went fine.

EdgeTTS Reader's Choice

Please add the possibility to select a reader in EdgeTTS (list of all readers in all languages)

That would be a very good feature

Cannot use TTS Appears to result in a large error message when attempting

2023-09-15 19:07:49.805 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\myhom\AppData\Local\Programs\Python\Python39\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "C:\RVCStudio\RVC-Studio\pages\3_Text_to_Speech.py", line 140, in
state.tts_audio = generate_speech(state.tts_text,speaker=os.path.basename(state.model_name).split(".")[0],method=state.tts_method, device=state.device)
File "C:\Users\myhom\AppData\Local\Programs\Python\Python39\lib\ntpath.py", line 216, in basename
return split(p)[1]
File "C:\Users\myhom\AppData\Local\Programs\Python\Python39\lib\ntpath.py", line 185, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Small FFmpeg error

I need to help to fix this error that pops of when i want to train the data:
Traceback (most recent call last):
File "D:\AI\VoiceUI\RVC-Studio\preprocessing_utils.py", line 72, in pipeline
audio = load_audio(path, self.sr)
File "D:\AI\VoiceUI\RVC-Studio\lib\audio.py", line 19, in load_audio
raise RuntimeError(f"Failed to load audio: {e}")
RuntimeError: Failed to load audio: ffmpeg error (see stderr output for detail)

Continue Training

So, I spent all night training, only to discover it needs more epocs, how to continue training?

Without a continue option, that's a lot of wasted power.

When going to train mine gets stuck

Mine just seams like it gets stuck here and never changes no matter how long i wait. it says "INFO:jc_v2_40k:{'train': {'log_interval': 200, 'seed': 1234, 'epochs': 20000, 'learning_rate': 0.0001, 'betas': [0.8, 0.99], 'eps': 1e-09, 'batch_size': 5, 'fp16_run': True, 'lr_decay': 0.999875, 'segment_size': 12800, 'init_lr_ratio': 1, 'warmup_epochs': 0, 'c_mel': 45, 'c_kl': 1.0}, 'data': {'max_wav_value': 32768.0, 'sampling_rate': 40000, 'filter_length': 2048, 'hop_length': 400, 'win_length': 2048, 'n_mel_channels': 125, 'mel_fmin': 0.0, 'mel_fmax': None, 'training_files': './logs\jc_v2_40k/filelist.txt'}, 'model': {'inter_channels': 192, 'hidden_channels': 192, 'filter_channels': 768, 'n_heads': 2, 'n_layers': 6, 'kernel_size': 3, 'p_dropout': 0, 'resblock': '1', 'resblock_kernel_sizes': [3, 7, 11], 'resblock_dilation_sizes': [[1, 3, 5], [1, 3, 5], [1, 3, 5]], 'upsample_rates': [10, 10, 2, 2], 'upsample_initial_channel': 512, 'upsample_kernel_sizes': [16, 16, 4, 4], 'use_spectral_norm': False, 'gin_channels': 256, 'spk_embed_dim': 109}, 'model_dir': './logs\jc_v2_40k', 'experiment_dir': './logs\jc_v2_40k', 'save_every_epoch': 5, 'name': 'jc', 'total_epoch': 1000, 'pretrainG': 'models\pretrained_v2\f0G40k.pth', 'pretrainD': 'models\pretrained_v2\f0D40k.pth', 'version': 'v2', 'gpus': '0', 'sample_rate': '40k', 'if_f0': 1, 'if_latest': 1, 'save_every_weights': '1', 'if_cache_data_in_gpu': 0}"

And on the home page I already downloaded everything. I did have it train a feature index and it did work.

opera_Hp4IjJwn2H
opera_IvbQihwCsY
opera_xCVxhQyZ6L

Train- Process data errors

Installed RVC-Studio on two Debian 12 linux machines
1 x Python 3.8.9 , 1 x 3.10.12
NO GPU only CPU,,,,,for completeness

ffmpeg-python IS installed

Training Process data, i get the following errors, have the audio files (wav) inside a folder zipped.
'copy path' from file browser into the ' Enter the path of the training folder:' with trailing forward slash (Linux)

EDIT:

Set up stderr output and this is what the stderr throws
RVC-Studio/input/inoutfiles.zip: Invalid data found when processing input

I have three wav files placed inside a folder in zip format that is inside the input directory path given in the datapath line ,,default shows 'dataset'
The native version of ffmpeg-5.1.4-0 on both Linux machines

`VC-Studio/preprocessing_utils.py", line 73, in pipeline
audio = load_audio(path, self.sr)
File "/home/brcisna/MyPrograms/rvcstudio/RVC-Studio/lib/audio.py", line 43, in load_audio
raise RuntimeError(f"Failed to load audio: {e}")
RuntimeError: Failed to load audio: ffmpeg error (see stderr output for detail)

/home/brcisna/MyPrograms/rvcstudio/RVC-Studio/datasets/elvis.zip->Traceback (most recent call last):
File "/home/brcisna/MyPrograms/rvcstudio/RVC-Studio/lib/audio.py", line 38, in load_audio
ffmpeg.input(file, threads=0)
File "/home/brcisna/.pyenv/versions/3.10.12/envs/RVC-Studio/lib/python3.10/site-packages/ffmpeg/_run.py", line 325, in run
raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/brcisna/MyPrograms/rvcstudio/RVC-Studio/preprocessing_utils.py", line 73, in pipeline
audio = load_audio(path, self.sr)
File "/home/brcisna/MyPrograms/rvcstudio/RVC-Studio/lib/audio.py", line 43, in load_audio
raise RuntimeError(f"Failed to load audio: {e}")
RuntimeError: Failed to load audio: ffmpeg error (see stderr output for detail)

end preprocess`

Greyed out 1-Click Infer (CANT CLICK)

I spent over 30 hours trying to troubleshoot this. I followed every bits of details there is on this. I absolutely need help now.

After I initiate the server, made sure everything is green, went to the inferring page, reloaded (refresh) button, selected my pth and mp3, 1-click does NOT want to come on

How to start the RVC server on google colab?

Hello, I have a problem when start a rvc server.
I press start button and after server api loading nothing happens:

image_1

At inference page after pressing refresh data button nothing happens and i cant choose voice model:

image_2

Also this is the path to my voice models. Sayano voice model I downloaded from your app.
image

Please, help me ๐Ÿ™

Unable to load the voice model

Hi I Tried to put model in RAV folder and index in RAV /.index / directory
but its not showing any model. I even downloaded using the home interface to download the models but still it's not showing/loading any voice model .
will be grateful if someone guide me .
Thanks

*Resolved* Docker image builds but does not connect to 0.0.0.0

building the docker image goes succesfully
when launching with 'docker container run rvc-studio' the web page comes up with,, 'refuse to connect to 0.0.0.0'

may be missing something. not familiar with docker.

Resolved
when running docker had to add '--net=host' to get internet connectivity. eg. 'docker run --net=host rvc-studo'

TIA

Training won't start -- torch distributed error -- even with one GPU selected

I was able to train one model successfully, but for reasons I can't understand, all subsequent attempts fail to train, even after a re-install from scratch. I'm attaching a screencap of the error message. This github thread Lightning-AI/pytorch-lightning#11865 suggests that the error could be solved by setting an environment variable -- SETexportNCCL_P2P_DISABLE=1` but that variable doesn't seem to persist after running streamlit run Home.py.

Is there a solution that I can implement in the code?

torch_distributed_error

coding question Home.py linux specific

EDIT
Looking closer this is Windows specific,to download ffmpeg from the landing page of RVC-Studio
My mistake,sorry.

Debian 12
Python=3.10.12

Am having troubles when i do a training session. I get tracebacks in regards to ffmpeg,
ffmpeg-python is installed

Question:
In the Home.py , the following lines have me puzzled. as Linux contains NO .exe files
Am showing my stupidity,, but is there something in python that can mimic 'exe /Windows executables

Home.py
lines 33 & 38 , ffmpeg.exe

line #33 - def render_download_ffmpeg(lib_name="ffmpeg.exe"):
col1, col2 = st.columns(2)
is_downloaded = os.path.exists(lib_name)
col1.checkbox(os.path.basename(lib_name),value=is_downloaded,disabled=True)
if col2.button("Download",disabled=is_downloaded,key=lib_name):
line #38 - link = f"{RVC_DOWNLOAD_LINK}ffmpeg.exe"
with st.spinner(f"Downloading from {link} to {lib_name}"):
file_downloader((lib_name,link))
st.experimental_rerun()

        TIA 

os.getlogin() not supported on docker

os.getlogin() used in the Chat page is not supported inside docker containers.
It can be fixed either by giving a default name or using getpass.getuser().

Extract Vocals

Extract Vocals
TypeError: object of type 'NoneType' has no len()
Traceback:
File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "C:\Users\xxx\Desktop\RVC-Studio-main\pages\1_Inference.py", line 193, in
with st.expander(i18n("inference.split_vocals.expander"),expanded=not (state.input_audio_name and len(state.uvr5_params.model_paths))):

trying to get rvc local

Checking if conda is already installed...
.cache folder does not exist. Creating it now.
Downloading Miniconda installer...

BITSADMIN version 3.0
BITS administration utility.
(C) Copyright Microsoft Corp.

Transfer complete.
Installing Miniconda...
Checking if conda is in the user path...
Something went wrong. Please check the installation log or submit a ticket at: https://github.com/SayanoAI/RVC-Studio/issues

Why?

Errno 2 while starting RVC Server

I get FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/python /app/api.py --port=5555 --host=0.0.0.0' when trying to start the RVC Server. RVC Studio is running in a docker container.

Traceback:

File "/usr/local/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
    exec(code, module.__dict__)
File "/app/pages/0_RVC_Server.py", line 65, in <module>
    start_server(host=state.host,port=state.port)
File "/app/pages/0_RVC_Server.py", line 31, in start_server
    p = subprocess.Popen(cmd, cwd=BASE_DIR)
File "/usr/local/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.8/subprocess.py", line 1720, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)

There are both api.py in the app dir, and python binary in /usr/local/bin inside the container.

AI Hub Contact Request

Hello! It's Antasma from the AI Hub Discord server.
Really sorry to write you through here, but that's the only way we found to reach you.
Could you contact me on Discord (@antasma245) ?
Many thanks in advance and really sorry for the inconvenience.

NameError: name "urllib" is not defined

file webui/components.py, line 168:
with urllib.request.urlopen(url) as response:

the problem is that no import for urllib was declared in the file. please provide a hotfix

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.