Comments (1)
Nice! Though process
function doesn't know about args var and it raises error.
Here's edited version:
import argparse
import text
from utils import load_filepaths_and_text
from multiprocessing import Pool, cpu_count
from tqdm import tqdm
def process(inputs):
i, line = inputs
cleaned_line = text._clean_text(line, ["my_cleaners2"]) # <- change this!
return i, cleaned_line
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--out_extension", default="cleaned")
parser.add_argument("--text_index", default=1, type=int)
parser.add_argument("--filelists", nargs="+", default=["filelists/ljs_audio_text_val_filelist.txt", "filelists/ljs_audio_text_test_filelist.txt"])
parser.add_argument("--text_cleaners", nargs="+", default=["my_cleaners2"])
args = parser.parse_args()
for filelist in args.filelists:
print("!START: ", filelist)
filepaths_and_text = load_filepaths_and_text(filelist)
inputs = [(i, filepaths_and_text[i][args.text_index]) for i in range(len(filepaths_and_text))]
print(f"!CPU count: {cpu_count()}")
with Pool(processes=cpu_count()) as pool:
with tqdm(total=len(inputs)) as pbar:
for i, line in tqdm(pool.imap_unordered(process, inputs)):
filepaths_and_text[i][args.text_index] = line
# print(" >> cleaned: {}".format(line))
pbar.update()
new_filelist = filelist + "." + args.out_extension
with open(new_filelist, "w", encoding="utf-8") as f:
f.writelines(["|".join(x) + "\n" for x in filepaths_and_text])
Took me ~25 mins for 19k lines.
from vits.
Related Issues (20)
- Training is too slow. WHY? HOT 2
- Computing power requirement HOT 1
- Training a 8k Model as LJSpeech.
- Problem when try to fine-turning on Google Colab: No kernel image
- Runtime error
- RuntimeError: DataLoader worker (pid 31433) is killed by signal: Aborted. HOT 2
- negative loss
- Why use `randn_like` when sampling from latent distribution?
- Korean Multi-speaker Model Convergence Failure HOT 4
- Why using z but not flow(z_p, spk_emb) for decoder ?
- Question about the TextEncoder
- VITS2? HOT 4
- How to use ground truth durations to train vits? HOT 5
- Cloning voices
- How can I know the number of steps? HOT 1
- Explanation for loss_disc, loss_gen, loss_fm,loss_mel, loss_kl? HOT 3
- ModuleNotFoundError: No module named 'unidecode' HOT 3
- Duration Issue with the generated audio HOT 3
- Issue with training at 8000Hz
- Iserting new symbols in a pre-trained model
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vits.