diff --git a/README.md b/README.md index 368e559..a752b3f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Welcome to play around with the base model, a Trilingual Anime VITS! [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/Plachta/VITS-Umamusume-voice-synthesizer) ### Currently Supported Tasks: -- [x] Convert user's voice to characters listed below +- [x] Convert user's voice to characters listed [here](https://github.com/SongtingLiu/VITS_voice_conversion/blob/main/configs/finetune_speaker.json) - [x] Chinese, English, Japanese TTS with user's voice - [ ] Chinese, English, Japanese TTS with custom characters... @@ -30,6 +30,10 @@ because the original VITS has some dependencies that are difficult to configure. ## Inference or Usage -1. Clone this repo -2. Install dependencies -3. run VC_inference.py +1. Install Python if you haven't done so (Python >= 3.7) +2. Clone this repo: +`git clone https://github.com/SongtingLiu/VITS_voice_conversion.git` +3. Install dependencies +`pip install -r requirements.txt` +4. run VC_inference.py +`python VC_inference.py` diff --git a/VC_inference.py b/VC_inference.py index 3fc5e2b..036da0b 100644 --- a/VC_inference.py +++ b/VC_inference.py @@ -1,26 +1,15 @@ import os -import json -import math import numpy as np import torch from torch import no_grad, LongTensor import librosa -from torch.nn import functional as F import argparse from mel_processing import spectrogram_torch -import commons import utils from models_infer import SynthesizerTrn -from text import text_to_sequence import gradio as gr import torchaudio device = "cuda:0" if torch.cuda.is_available() else "cpu" -def get_text(text, hps): - text_norm = text_to_sequence(text, hps.symbols, hps.data.text_cleaners) - if hps.data.add_blank: - text_norm = commons.intersperse(text_norm, 0) - text_norm = torch.LongTensor(text_norm) - return text_norm def create_vc_fn(model, hps, speaker_ids): def vc_fn(original_speaker, target_speaker, record_audio, upload_audio, denoise): diff --git a/requirements_infer.txt b/requirements_infer.txt new file mode 100644 index 0000000..7d06528 --- /dev/null +++ b/requirements_infer.txt @@ -0,0 +1,11 @@ +Cython +librosa +numpy +scipy +torch +torchvision +torchaudio +unidecode +protobuf +demucs +gradio \ No newline at end of file