JarodMica / audiobook_maker

GNU General Public License v3.0
203 stars 34 forks source link

rvc_infer missing some files when running on specific GPUs #12

Closed sunbart closed 11 months ago

sunbart commented 11 months ago

When running the tool on an NVIDIA GTX 1070, I get the following error after the first sentence is received from the tortoise API:

(venv) PS C:\Users\John\audiobook_maker> python.exe .\audio_book_app_2_0.py
Calling API with sentence: <In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since.>
API response received with audio path: C:\Users\John\tortoise_tts\results/ashley//ashley_00021.wav
16系/10系显卡和P40强制单精度
Traceback (most recent call last):
  File "C:\Users\John\audiobook_maker\audio_book_app_2_0.py", line 26, in run
    self.function(self.directory_path, self.report_progress)
  File "C:\Users\John\audiobook_maker\audio_book_app_2_0.py", line 641, in generate_audio_for_sentence_threaded
    audio_path = self.generate_audio(sentence)
  File "C:\Users\John\audiobook_maker\audio_book_app_2_0.py", line 685, in generate_audio
    audio_path = rvc_convert(model_path=voice_model_path, 
  File "c:\users\john\audiobook_maker\venv\src\rvc-tts-pipe\rvc_infer.py", line 316, in rvc_convert
    config=Config(device,is_half)
  File "c:\users\john\audiobook_maker\venv\src\rvc-tts-pipe\rvc_infer.py", line 29, in __init__
  File "c:\users\john\audiobook_maker\venv\src\rvc-tts-pipe\rvc_infer.py", line 45, in device_config
    with open(f"configs/{config_file}", "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'configs/32k.json'

The error originates from JarodMica/rvc-tts-pipeline module, specifically rvc-infer.

Judging from the code, this should affect all 10 and 16 series GPUs and the P40.

Copying the relevant files from JarodMica/rvc to my root installation folder fixes this.

JarodMica commented 11 months ago

Looks like that's due to the hardcoded paths in there, throwing the configs in your parent directory resolves the issue. The latest versions of the audiobook maker will be using a different version of the rvc_infer so i'll need to check that with those GPUs the config path is coded correctly

But for now, the resolution is to copy the configs folder from the RVC GH to your root directory.