Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

se_extractor.get_se递归调用过深 #353

Open
keqixiaojie opened this issue Jan 13, 2025 · 2 comments
Open

se_extractor.get_se递归调用过深 #353

keqixiaojie opened this issue Jan 13, 2025 · 2 comments
Labels
bug Something isn't working question Further information is requested

Comments

@keqixiaojie
Copy link

Traceback (most recent call last):
File "/root/shared-nvme/OpenVoice/part3.py", line 17, in
target_se, audio_name = se_extractor.get_se(reference_speaker, tone_color_converter, vad=False)
File "/root/shared-nvme/OpenVoice/openvoice/se_extractor.py", line 152, in get_se
return vc_model.extract_se(audio_segs, se_save_path=se_path), audio_name
File "/root/shared-nvme/OpenVoice/openvoice/api.py", line 123, in extract_se
audio_ref, sr = librosa.load(fname, sr=hps.data.sampling_rate)
File "/root/shared-nvme/conda/envs/openvoice/lib/python3.9/site-packages/librosa/util/decorators.py", line 88, in inner_f
return f(*args, **kwargs)
File "/root/shared-nvme/conda/envs/openvoice/lib/python3.9/site-packages/librosa/core/audio.py", line 183, in load
y = resample(y, orig_sr=sr_native, target_sr=sr, res_type=res_type)
File "/root/shared-nvme/conda/envs/openvoice/lib/python3.9/site-packages/librosa/util/decorators.py", line 88, in inner_f
return f(*args, **kwargs)
File "/root/shared-nvme/conda/envs/openvoice/lib/python3.9/site-packages/librosa/core/audio.py", line 617, in resample
y_hat = resampy.resample(y, orig_sr, target_sr, filter=res_type, axis=-1)
File "/root/shared-nvme/conda/envs/openvoice/lib/python3.9/site-packages/resampy/core.py", line 168, in resample
resample_f_s(
File "/root/shared-nvme/conda/envs/openvoice/lib/python3.9/site-packages/numba/np/ufunc/gufunc.py", line 279, in call
return self.ufunc(*args, **kwargs)
RecursionError: maximum recursion depth exceeded while calling a Python object
请问这该怎么解决

Copy link

dosubot bot commented Jan 13, 2025

@keqixiaojie 你好!我是Dosu,我是一个可以帮助你解决 bug、回答问题并成为贡献者的机器人。我会在等待人类维护者的时候帮助你。

The RecursionError: maximum recursion depth exceeded while calling a Python object typically occurs when a function calls itself too many times without a base case to stop the recursion. In the context of the resample function from librosa, this error might be related to the resampling process, possibly due to an issue with the input data or the parameters being used.

Here are a few steps you can take to troubleshoot and potentially resolve this issue:

  1. Check Input Audio Files: Ensure that the audio files being processed are not corrupted and are in a supported format. Sometimes, issues with the audio file itself can cause unexpected behavior.

  2. Sampling Rate Mismatch: Verify that the original sampling rate of the audio files matches the expected sampling rate (hps.data.sampling_rate). If there's a mismatch, it might cause excessive resampling operations.

  3. Update Libraries: Make sure that you are using the latest versions of librosa and resampy. There might be bug fixes or improvements in newer versions that address this issue.

  4. Modify Recursion Limit: As a temporary workaround, you can increase the recursion limit in Python using sys.setrecursionlimit(new_limit). However, this is not a recommended long-term solution as it might lead to other issues.

  5. Alternative Resampling Methods: If the problem persists, consider using a different resampling method or library to handle the audio resampling process.

If these steps do not resolve the issue, you may need to further investigate the specific conditions under which the error occurs, such as the size and content of the audio files or the specific parameters used in the resample function.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added bug Something isn't working question Further information is requested labels Jan 13, 2025
@keqixiaojie
Copy link
Author

解决了,重装了librosa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant