CorentinJ / Real-Time-Voice-Cloning

Clone a voice in 5 seconds to generate arbitrary speech in real-time
Other
52.84k stars 8.8k forks source link

Runtime error #1270

Open boberski666 opened 1 year ago

boberski666 commented 1 year ago
PS D:\Projekty\Voice\Real-Time-Voice-Cloning-master> python demo_cli.py
Traceback (most recent call last):
  File "demo_cli.py", line 5, in <module>
    import librosa
  File "C:\Users\marci\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\librosa\__init__.py", line 211, in <module>
    from . import core
  File "C:\Users\marci\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\librosa\core\__init__.py", line 5, in <module>
    from .convert import *  # pylint: disable=wildcard-import
  File "C:\Users\marci\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\librosa\core\convert.py", line 7, in <module>
    from . import notation
  File "C:\Users\marci\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\librosa\core\notation.py", line 8, in <module>
    from ..util.exceptions import ParameterError
  File "C:\Users\marci\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\librosa\util\__init__.py", line 83, in <module>
    from .utils import *  # pylint: disable=wildcard-import
  File "C:\Users\marci\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\librosa\util\utils.py", line 6, in <module>
    import scipy.ndimage
  File "C:\Users\marci\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\__init__.py", line 136, in <module>
    from . import _distributor_init
  File "C:\Users\marci\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\_distributor_init.py", line 64, in <module>
    WinDLL(os.path.abspath(filename))
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Nie można odnaleźć określonego modułu
PS D:\Projekty\Voice\Real-Time-Voice-Cloning-master>

Any idea why? I run it on win 11, python 3.7

alphaleadership commented 1 year ago

try pip install librosa

Elise0177 commented 11 months ago

RuntimeError in Realtime Voice Cloning can occur due to various reasons, such as incorrectly configured parameters or incorrect use of the program. Here are some ways to solve this problem:

  1. Verify that all necessary libraries and dependencies are correctly installed and configured for Realtime Voice Cloning to work. Make sure all components are installed and configured correctly.

  2. Make sure that you are using a version of the program and all dependencies that is compatible with each other. Some errors may occur due to version incompatibility.

  3. Check that the data and program parameters are entered correctly. Make sure all files and paths are correct.

  4. Try the community or forums for Realtime Voice Cloning. Perhaps someone has already encountered a similar problem and can help solve it.

  5. Update the program and all dependencies to the latest versions. The bug may have been fixed in the new version.

DevBuddyConnor commented 7 months ago

问题描述是在运行demo_cli.py时遇到了运行时错误,具体表现为模块加载失败。错误信息表明在尝试导入librosa库时,引发了OSError,具体的错误是[WinError 126],即找不到指定的模块。这个问题通常发生在试图加载的DLL或其依赖项之一无法找到时。

修复建议

  1. 确保所有必要的库都已正确安装:首先,确认librosascipy这两个库已经正确安装在您的环境中。可以通过以下命令进行检查和安装:

    pip install librosa scipy
  2. 验证环境变量WinError 126可能是由于环境变量配置不正确或者缺失导致的。确认PythonLibrary bin目录(如NumPy或SciPy的DLLs)已被添加到系统的PATH环境变量中。

  3. 更新Python和库:有时候,旧版本的库或Python可能会导致兼容性问题。考虑更新Python到最新的稳定版本,同时也更新所有相关的库:

    pip install --upgrade python
    pip install --upgrade librosa scipy
  4. 检查系统的DLL依赖项:这个问题也可能是因为scipy库试图加载的某个DLL在系统上不存在。使用工具如Dependency WalkerProcess Monitor来检查scipy及其依赖项试图加载的DLL,看看是否有缺失。

  5. 重新安装运行时库:某些情况下,运行时库的损坏或版本不匹配可能导致此错误。考虑重新安装如Visual C++ Redistributable等运行时库。

示例代码

由于这是一个运行时错误,涉及整个环境配置问题,而不是单独的代码问题,因此这里没有具体可以提供的修复示例代码。遵循上述建议进行检查和修复后,您应该能够解决遇到的问题。

如果进行了上述操作仍然无法解决问题,那么可能需要更详细的环境和配置信息以确定问题的根本原因。

[注意] 该Comment由AI生成,仅供参考。