JarodMica / audiobook_maker

GNU General Public License v3.0
255 stars 43 forks source link

ValueError: mode must be 'r', 'w', or None, got rb #39

Closed pointave closed 6 months ago

pointave commented 6 months ago

[nltk_data] Package punkt is already up-to-date! Calling API with sentence: <Narration of rezero using text to speech, Marine edition> API response received with audio path: C:\Users\point\Github\audiobook_maker\out/fisher//fisher_00000.wav C:\Users\point\AppData\Local\anaconda3\envs\audiobook\lib\site-packages\torch\nn\utils\weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm. warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.") 2024-03-22 13:46:45 | WARNING | rvc.infer.modules.vc.modules | Traceback (most recent call last): File "C:\Users\point\Github\audiobook_maker\rvc\infer\lib\audio.py", line 56, in load_audio audio2(f, out, "f32le", sr) File "C:\Users\point\Github\audiobook_maker\rvc\infer\lib\audio.py", line 31, in audio2 inp = av.open(i, "rb") File "av\container\core.pyx", line 398, in av.container.core.open ValueError: mode must be 'r', 'w', or None, got: rb

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\point\Github\audiobook_maker\rvc\infer\modules\vc\modules.py", line 171, in vc_single audio = load_audio(input_audio_path, 16000) File "C:\Users\point\Github\audiobook_maker\rvc\infer\lib\audio.py", line 66, in load_audio raise RuntimeError(f"Failed to load audio: {e}") RuntimeError: Failed to load audio: mode must be 'r', 'w', or None, got: rb

Traceback (most recent call last): File "C:\Users\point\Github\audiobook_maker\audio_book_app_2_0.py", line 46, in run self.function(self.directory_path, self.report_progress) File "C:\Users\point\Github\audiobook_maker\audio_book_app_2_0.py", line 752, in generate_audio_for_sentence_threaded audio_path = self.generate_audio(sentence) File "C:\Users\point\Github\audiobook_maker\audio_book_app_2_0.py", line 796, in generate_audio audio_path = rvc_convert(model_path=voice_model_path, File "C:\Users\point\AppData\Local\anaconda3\envs\audiobook\lib\site-packages\rvc_pipe\rvc_infer.py", line 125, in rvc_convert wavfile.write(output_file_path, tgt_sr, audio_opt) File "C:\Users\point\AppData\Local\anaconda3\envs\audiobook\lib\site-packages\scipy\io\wavfile.py", line 771, in write dkind = data.dtype.kind AttributeError: 'NoneType' object has no attribute 'dtype'

So I tried both manually and using the setup bat, but whenever I generate the program closes. There is output audio, both in the output folder and the results folder. It only gets the first sentence, and sometimes it doesnt write the output.wav and it stays 0kb.

pointave commented 6 months ago

I git cloned the repo, which seems to be the issue, works fine now after downloading the release on the right hand side.