mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-11-05 00:27:30 +00:00
[GH-ISSUE #351] Audio buffer is not finite everywhere #173
Labels
No labels
AMD/Intel
bug
bug
bug
colab
dependencies
documentation
duplicate
enhancement
following up
good first issue
help wanted
invalid
question
stale
stale
stale
todo list
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
RVC-Project/Retrieval-based-Voice-Conversion-WebUI#173
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xiaoshuyimei on GitHub (May 26, 2023).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/351
进行人声分离操作时,windows 64位系统,报错
Traceback (most recent call last):
File "D:\voiceprint_migration\RVC-beta\infer-web.py", line 294, in uvr
pre_fun.path_audio(inp_path, save_root_ins, save_root_vocal)
File "D:\voiceprint_migration\RVC-beta\infer_uvr5.py", line 135, in path_audio
wav_instrument = spec_utils.cmb_spectrogram_to_wave(
File "D:\voiceprint_migration\RVC-beta\uvr5_pack\lib_v5\spec_utils.py", line 392, in cmb_spectrogram_to_wave
wave = librosa.resample(
File "D:\voiceprint_migration\RVC-beta\runtime\lib\site-packages\librosa\util\decorators.py", line 104, in inner_f
return f(**kwargs)
File "D:\voiceprint_migration\RVC-beta\runtime\lib\site-packages\librosa\core\audio.py", line 606, in resample
util.valid_audio(y, mono=False)
File "D:\voiceprint_migration\RVC-beta\runtime\lib\site-packages\librosa\util\decorators.py", line 88, in inner_f
return f(*args, **kwargs)
File "D:\voiceprint_migration\RVC-beta\runtime\lib\site-packages\librosa\util\utils.py", line 294, in valid_audio
raise ParameterError("Audio buffer is not finite everywhere")
librosa.util.exceptions.ParameterError: Audio buffer is not finite everywhere
求助
@RVC-Boss commented on GitHub (May 29, 2023):
检查下你的输入的音频的路径,这个音频是不是非常短,文件很小
@xiaoshuyimei commented on GitHub (May 31, 2023):
音频文件我切成的都是5秒一段的,这个会是影响点吗
@creativekoalaroo commented on GitHub (Jul 8, 2023):
Hi,
I am facing the same issue. Windows 11.
This is in the separation & reverberation removal process.
The input file name is 'toSplit.wav'. This error is consistent, tried for various different wav files (files downloaded, generated, converted from mp3, same error for all)
Is it related to the GPU or system config?
Can you please help me with this? Thanks in advance.
Please let me know if you need any further info.
toSplit.wav.reformatted.wav->Traceback (most recent call last):
File "E:\RVC\infer-web.py", line 370, in uvr
pre_fun.path_audio(
File "E:\RVC\infer_uvr5.py", line 120, in path_audio
wav_instrument = spec_utils.cmb_spectrogram_to_wave(
File "E:\RVC\uvr5_pack\lib_v5\spec_utils.py", line 392, in cmb_spectrogram_to_wave
wave = librosa.resample(
File "E:\RVC\runtime\lib\site-packages\librosa\util\decorators.py", line 104, in inner_f
return f(**kwargs)
File "E:\RVC\runtime\lib\site-packages\librosa\core\audio.py", line 576, in resample
util.valid_audio(y, mono=False)
File "E:\RVC\runtime\lib\site-packages\librosa\util\decorators.py", line 88, in inner_f
return f(*args, **kwargs)
File "E:\RVC\runtime\lib\site-packages\librosa\util\utils.py", line 294, in valid_audio
raise ParameterError("Audio buffer is not finite everywhere")
librosa.util.exceptions.ParameterError: Audio buffer is not finite everywhere
@IndraTensei commented on GitHub (Jul 26, 2023):
Facing the same issue here too
@ArthurG29 commented on GitHub (Aug 11, 2023):
Hello, I am facing the same issue aswell
@HIX4123 commented on GitHub (Oct 14, 2023):
same here too
@xiaoxor commented on GitHub (Jan 19, 2024):
I have encountered this problem as well. My GPU is a 1660ti. It has poor compatibility with half precision optimization.
. Could this be related to the issue?
@Zhincore commented on GitHub (Apr 18, 2024):
Still same issue
EDIT: This was happening because I was trying to use my own script. RVC has 3 levels of try-except that re-try the
_path_audio_method again, and now I understand why 🙃 This error does not happen to me when using WebUI@HaRry-qaq commented on GitHub (Jul 28, 2024):
I explored the cause.
When using the WebUI to perform operations step by step, this phenomenon rarely occurs. This may be because each time the model is re-entered, librosa is used to re-read the audio and remove possible non-compliant parts.
I use scripts to perform various operations myself. In most cases, this phenomenon does not occur. There are several possible reasons:
(1) The audio length is too short.
(2) There is complete silence in some long parts of the audio.
(3) Your graphics card may not support half-precision training.
In the above cases, before
spec_utils.cmb_spectrogram_to_wave()in./infer/modules/uvr5/vr.py, tensors such asv_spec_mwill become nan. Before becoming nan, the real number domain of the complex signal of the tensor is 0.In addition, this phenomenon often occurs in DeReverb. When this happens, commenting DeReverb can run normally.
Based on the above cases, I think that directly setting the nan value to 0 will not affect the final output. What I did was to first change nan to 0 in the
cmb_spectrogram_to_wave()function in line 349 of./infer/lib/uvr5_pack/lib_v5/spec_utils.py. So far, I have not gotten any abnormal output.By the way, this situation may be caused by the use of
librosa.core.load()in line 63 of./infer/modules/uvr5/vr.pyinstead of ffmpeg. The author also gave a comment that there may be a bug there. Additionally, it is best to concatenate your training data into longer (10+ minutes) audio clips.我探究了一下成因。
在使用WebUI分步操作时,这种现象几乎不会出现。这可能是因为每一次重新进入模型时,都会使用librosa重新读取音频,去除了可能不合规范的地方。
而我自己使用脚本执行各个操作。在大部分情况下,这个现象都不会出现。主要有以下几种可能出现的原因:
(1) 音频长度过短。
(2) 音频在某些较长的地方存在完全的静音。
(3) 你的显卡可能不支持半精度训练。
在以上情况下,在
./infer/modules/uvr5/vr.py的spec_utils.cmb_spectrogram_to_wave()前,v_spec_m等张量都会变成nan。而在变成nan之前,张量的复数信号的实数域都是0.此外,这种现象经常在DeReverb中出现。当出现这种情况时,注释DeReverb后能够正常运行。
由以上几种情况,我认为直接将nan值置0并不会影响最终的输出。我的做法是在
./infer/lib/uvr5_pack/lib_v5/spec_utils.py349行的cmb_spectrogram_to_wave()函数中先将nan变为0。到目前为止,我并没有得到任何异常输出。多提一句,这种情况可能是
./infer/modules/uvr5/vr.py中 63 行使用了librosa.core.load(),而没有使用ffmpeg导致的,作者本人也在那里给出了可能存在bug的注释。此外,最好将训练数据拼接成较长(10分钟以上)的音频。@HaRry-qaq commented on GitHub (Jul 28, 2024):
@xiaoshuyimei @ArthurG29 @creativekoalaroo @Zhincore @IndraTensei
@Tuanshu commented on GitHub (Nov 21, 2024):
I also encountered a similar problem. Even after ensuring that
spec_mdoesn't contain anyNonevalues, errors might still occur.Later, I discovered that after
spectrogram_to_wave(iFFT), None values might still be generated. So at the end of spectrogram_to_wave, I set anyNonevalues to 0.I haven't encountered the problem since.
我也遇到類似的問題 即使確保
spec_m沒有None也可能報錯後來發現在
spectrogram_to_wave(iFFT)後也可能產生None, 所以在spectrogram_to_wave的最後將None設為0目前沒再遇到問題