我正在尝试对这段代码做一些调整,并测试它:https://github.com/openai/whisper
但是,在对代码进行了调整之后,我不知道如何将whisper程序作为CLI运行。我已经在全球范围内安装了它,所以我可以正确地运行$ whisper,但是如何在本地运行它呢?我显然不太了解python,我已经运行了$ python setup.py install,下一步是什么?谢谢
我原以为是$ python ./whisper,但我收到了一个错误:
Traceback (most recent call last):
File "/Users/user/.pyenv/versions/3.9.0/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/user/.pyenv/versions/3.9.0/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/user/Development/whisper/test/whisper/whisper/__main__.py", line 1, in <module>
from .transcribe import cli
ImportError: attempted relative import with no known parent package发布于 2022-10-25 17:01:30
尝尝这个
克隆回购或下载存储库Zip。
抽出来
打开终端并将目录更改为新提取的文件夹。
$ cd whisper然后通过键入以下命令来安装需求
$ pip install requirements.txt该文件存在,因此它将工作。
现在创建一个轮子
$ python setup.py bdist_wheel等待它的建造。它将构建一个.whl文件。
现在输入要安装的.whl全名,或者在输入和它们的空间后可以拖放。
$ pip install /path/to/{filename}-{version}-{pyversion}.whl安装完毕后。
关闭终端,打开另一个,然后低声呼叫
$ whisperhttps://stackoverflow.com/questions/74197554
复制相似问题