lainlives commited on
Commit
e7ea2ee
·
1 Parent(s): 2e759b6
main/app/app.py CHANGED
@@ -432,8 +432,84 @@ js_code = (
432
  translations["provide_file"].format(filename=translations["model"]),
433
  )
434
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
435
 
436
- client_mode = True # "--client" in sys.argv
437
 
438
  with gr.Blocks(
439
  title="📱 Vietnamese-RVC GUI BY ANH",
 
432
  translations["provide_file"].format(filename=translations["model"]),
433
  )
434
  )
435
+
436
+
437
+ def move_files_by_extension(dump_path_str, index_path_str, weights_path_str):
438
+ """
439
+ Recursively moves .index files to index_path_dump_path and
440
+ .pth files to weights_path_dump_path from dump_path.
441
+
442
+ Args:
443
+ dump_path_str (str): The source directory path.
444
+ index_path_str (str): The destination directory path for .index files.
445
+ weights_path_str (str): The destination directory path for .pth files.
446
+ """
447
+ dump_path = Path(dump_path_str)
448
+ index_path = Path(index_path_str)
449
+ weights_path = Path(weights_path_str)
450
+
451
+ # Create destination directories if they don't exist
452
+ index_path.mkdir(parents=True, exist_ok=True)
453
+ weights_path.mkdir(parents=True, exist_ok=True)
454
+
455
+ # 1. Move .index files
456
+ # Use rglob for recursive search in all subdirectories
457
+ for file_path in dump_path.rglob('*.index'):
458
+ try:
459
+ destination = index_path / file_path.name
460
+ shutil.move(str(file_path), str(destination))
461
+ print(f"Moved '{file_path.name}' to '{index_path}'")
462
+ except shutil.Error as e:
463
+ print(f"Error moving file {file_path}: {e}")
464
+ except FileNotFoundError as e:
465
+ print(f"File not found {file_path}: {e}")
466
+
467
+ # 2. Move .pth files
468
+ for file_path in dump_path.rglob('*.pth'):
469
+ try:
470
+ destination = weights_path / file_path.name
471
+ shutil.move(str(file_path), str(destination))
472
+ print(f"Moved '{file_path.name}' to '{weights_path}'")
473
+ except shutil.Error as e:
474
+ print(f"Error moving file {file_path}: {e}")
475
+ except FileNotFoundError as e:
476
+ print(f"File not found {file_path}: {e}")
477
+
478
+
479
+
480
+
481
+ dump_path = os.path.join("assets", "tempdump")
482
+ index_path_dump_path = os.path.join("assets", "logs")
483
+ weights_path_dump_path = os.path.join("assets", "weights")
484
+
485
+
486
+ uvr_dump_path = os.path.join("main", "main", "assets", "models", "uvr5")
487
+ #index_path_dump_path = os.path.join(index_path)
488
+ #index_path_dump_path = os.path.join(index_path)
489
+ #index_path_dump_path = os.path.join(index_path)
490
+
491
+ repo_id = "lainlives/voice"
492
+ hf_token = os.environ.get("HF_TOKEN")
493
+ hf_hub_download(repo_id=repo_id, local_dir=dump_path, token=hf_token subfolder=rvc/voice_models)
494
+ move_files_by_extension(dump_path, index_path_dump_path, weights_path_dump_path)
495
+
496
+
497
+
498
+
499
+
500
+ hf_hub_download(repo_id=repo_id, local_dir=uvr_dump_path, token=hf_token subfolder=audio_separator)
501
+ #hf_hub_download(repo_id=repo_id, local_dir=dump_path, token=hf_token)
502
+ #hf_hub_download(repo_id=repo_id, local_dir=dump_path, token=hf_token)
503
+ #hf_hub_download(repo_id=repo_id, local_dir=dump_path, token=hf_token)
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
 
512
+ client_mode = False # "--client" in sys.argv
513
 
514
  with gr.Blocks(
515
  title="📱 Vietnamese-RVC GUI BY ANH",
main/app/tabs/inference/child/convert.py CHANGED
@@ -182,8 +182,7 @@ def convert_tab():
182
  value="audios/output.wav",
183
  placeholder="audios/output.wav",
184
  info=translations["output_path_info"],
185
- interactive=True,
186
- allow_custom_value=False,
187
  )
188
  with gr.Column():
189
  refresh0 = gr.Button(translations["refresh"])
 
182
  value="audios/output.wav",
183
  placeholder="audios/output.wav",
184
  info=translations["output_path_info"],
185
+ interactive=False,
 
186
  )
187
  with gr.Column():
188
  refresh0 = gr.Button(translations["refresh"])
packages.txt CHANGED
@@ -1,2 +1,5 @@
1
  portaudio19-dev
2
- libportaudio2
 
 
 
 
1
  portaudio19-dev
2
+ libportaudio2
3
+ htop
4
+ micro
5
+ nvtop
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- # Platform-specific requirements section
2
  pip>=23.3
3
  wheel
4
  omegaconf>=2.0.6
@@ -19,46 +19,46 @@ torchaudio>=2.3.1
19
  faiss-cpu==1.7.3; python_version < "3.12"
20
  faiss-cpu>=1.7.3; python_version >= "3.12"
21
 
22
- # Machine learning, NLP and deep learning
23
  transformers>=4.49.0
24
  scikit-learn
25
  einops>=0.8.0
26
 
27
- # Pitch and sound processing
28
  librosa>=0.10.2
29
  pydub>=0.25.1
30
  praat-parselmouth
31
  soundfile>=0.13.0
32
  pedalboard
33
 
34
- # Data processing and calculation
35
  numpy>=1.25.2,<2.0.0
36
  numba>=0.57.0
37
  scipy>=1.15.0
38
  matplotlib>=3.7.2
39
 
40
- # Implementation and web framework
41
  gradio>=5.23.3,<6.0.0
42
  requests>=2.32.3
43
  aiohttp
44
  pysrt
45
 
46
- # Utility section
47
  yt-dlp
48
  edge-tts>=7.2.0
49
  ffmpy==0.3.1
50
  ffmpeg-python>=0.2.0
51
  beautifulsoup4
52
 
53
- # Tensorboard and ONNX
54
  tensorboard
55
  onnx>=1.14
56
  onnxslim
57
  onnx2torch>=1.5.15
58
 
59
- # Cryptography section
60
  pycryptodome>=3.9.6,<4.0.0
61
 
62
- # Realtime and VAD
63
  sounddevice>=0.5.2
64
- webrtcvad-wheels>=2.0.14
 
1
+ # Platform-specific
2
  pip>=23.3
3
  wheel
4
  omegaconf>=2.0.6
 
19
  faiss-cpu==1.7.3; python_version < "3.12"
20
  faiss-cpu>=1.7.3; python_version >= "3.12"
21
 
22
+ # Machine learning
23
  transformers>=4.49.0
24
  scikit-learn
25
  einops>=0.8.0
26
 
27
+ # Pitch processing
28
  librosa>=0.10.2
29
  pydub>=0.25.1
30
  praat-parselmouth
31
  soundfile>=0.13.0
32
  pedalboard
33
 
34
+ # Processing
35
  numpy>=1.25.2,<2.0.0
36
  numba>=0.57.0
37
  scipy>=1.15.0
38
  matplotlib>=3.7.2
39
 
40
+ # Web framework
41
  gradio>=5.23.3,<6.0.0
42
  requests>=2.32.3
43
  aiohttp
44
  pysrt
45
 
46
+ # Stuff
47
  yt-dlp
48
  edge-tts>=7.2.0
49
  ffmpy==0.3.1
50
  ffmpeg-python>=0.2.0
51
  beautifulsoup4
52
 
53
+ # Tensorboard
54
  tensorboard
55
  onnx>=1.14
56
  onnxslim
57
  onnx2torch>=1.5.15
58
 
59
+ # Crypto
60
  pycryptodome>=3.9.6,<4.0.0
61
 
62
+ # Realtime
63
  sounddevice>=0.5.2
64
+ webrtcvad-wheels>=2.0.14