快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

OpenAIWhisper探索(一)-创新互联

1.根据提示安装依赖 :

安装Whisper前先安装依赖

在五莲等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供做网站、网站建设 网站设计制作按需定制网站,公司网站建设,企业网站建设,成都品牌网站建设,成都全网营销推广,成都外贸网站制作,五莲网站建设费用合理。1.1安装torch:

ERROR: Could not find a version that satisfies the requirement torch (from versions: none)

经过了解torch是

pip install torch
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting torch
  Downloading https://mirrors.aliyun.com/pypi/packages/a6/41/122f37c99422566ea74b9cce90eb9218f5e8fb2582466da220f95842a0a0/torch-1.13.1-cp38-cp38-win_amd64.whl (162.6 MB)
     ---------------------------------------- 162.6/162.6 MB 502.9 kB/s eta 0:00:00
Requirement already satisfied: typing-extensions in 。。。 (from torch) (3.10.0.2)
Installing collected packages: torch
Successfully installed torch-1.13.1
  • PS: 运行的时候还会遇到提示缺少VC环境,按照提示地址下载安装就可以了

Microsoft Visual C++ Redistributable is not installed, this may lead to the DLL
load failure.
It can be downloaded at https://aka.ms/vs/16/release/vc_redist.x64.exe
OSError: [WinError 126] 找不到指定的模块。 Error loading “c:\python\python38\lib
\site-packages\torch\lib\c10.dll” or one of its dependencies.

1.2安装transformers

ERROR: Could not find a version that satisfies the requirement transformers>=4.19.0 (from whisper) (from versions: none)

pip install transformers
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting transformers
  Downloading https://mirrors.aliyun.com/pypi/packages/90/5b/02becd3e137fdacdc30c6442d04094d0b92e500f978df00b1a197b68fd2b/transformers-4.25.1-py3-none-any.whl (5.8 MB)
     ---------------------------------------- 5.8/5.8 MB 670.1 kB/s eta 0:00:00
Installing collected packages: tokenizers, regex, packaging, filelock, huggingface-hub, transformers
Successfully installed filelock-3.8.2 huggingface-hub-0.11.1 packaging-22.0 regex-2022.10.31 tokenizers-0.13.2 transformers-4.25.1
1.3安装ffmpeg-python

ERROR: Could not find a version that satisfies the requirement ffmpeg-python==0.2.0 (from whisper) (from versions: none)

pip install ffmpeg-python
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting ffmpeg-python
  Downloading https://mirrors.aliyun.com/pypi/packages/d7/0c/56be52741f75bad4dc6555991fabd2e07b432d333da82c11ad701123888a/ffmpeg_python-0.2.0-py3-none-any.whl (25 kB)
Requirement already satisfied: future in h:\program files\python\python38\lib\site-packages (from ffmpeg-python) (0.18.2)
Installing collected packages: ffmpeg-python
Successfully installed ffmpeg-python-0.2.0

。。。根据提示安装其他依赖

2.安装完所有依赖后安装whisper
pip install git+https://github.com/openai/whisper.git
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting git+https://github.com/openai/whisper.git
  Cloning https://github.com/openai/whisper.git to 。。。。\local\temp\pip-req-build-wj07mmuz
  Running command git clone --quiet https://github.com/openai/whisper.git '。。。。\Local\Temp\pip-req-build-wj07mmuz'
  Resolved https://github.com/openai/whisper.git to commit 0b5dcfdef7ec04250b76e13f1630e32b0935ce76
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in 。。。 (from whisper==1.0) (1.18.4)
Requirement already satisfied: torch in 。。。 (from whisper==1.0) (1.13.1)
Requirement already satisfied: tqdm in 。。。 (from whisper==1.0) (4.48.0)
Requirement already satisfied: more-itertools in 。。。 (from whisper==1.0) (8.5.0)
Requirement already satisfied: transformers>=4.19.0 in 。。。 (from whisper==1.0) (4.25.1)
Requirement already satisfied: ffmpeg-python==0.2.0 in 。。。 (from whisper==1.0) (0.2.0)
Requirement already satisfied: future in 。。。 (from ffmpeg-python==0.2.0->whisper==1.0) (0.18.2)
Requirement already satisfied: regex!=2019.12.17 in 。。。 (from transformers>=4.19.0->whisper==1.0) (2022.10.31)
Requirement already satisfied: huggingface-hub<1.0,>=0.10.0 in 。。。 (from transformers>=4.19.0->whisper==1.0) (0.11.1)
Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in 。。。 (from transformers>=4.19.0->whisper==1.0) (0.13.2)
Requirement already satisfied: pyyaml>=5.1 in 。。。 (from transformers>=4.19.0->whisper==1.0) (5.4.1)
Requirement already satisfied: requests in 。。。 (from transformers>=4.19.0->whisper==1.0) (2.23.0)
Requirement already satisfied: packaging>=20.0 in 。。。 (from transformers>=4.19.0->whisper==1.0) (22.0)
Requirement already satisfied: filelock in 。。。 (from transformers>=4.19.0->whisper==1.0) (3.8.2)
Requirement already satisfied: typing-extensions in 。。。 (from torch->whisper==1.0) (3.10.0.2)
Requirement already satisfied: idna<3,>=2.5 in 。。。 (from requests->transformers>=4.19.0->whisper==1.0) (2.9)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in 。。。 (from requests->transformers>=4.19.0->whisper==1.0) (1.25.9)
Requirement already satisfied: certifi>=2017.4.17 in 。。。 (from requests->transformers>=4.19.0->whisper==1.0) (2020.4.5.1)
Requirement already satisfied: chardet<4,>=3.0.2 in 。。。 (from requests->transformers>=4.19.0->whisper==1.0) (3.0.4)
Installing collected packages: whisper
  DEPRECATION: whisper is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for whisper ... done
Successfully installed whisper-1.0

下载引用models文件所在默认路径

%UserProfile%\.cache\whisper

你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧


文章标题:OpenAIWhisper探索(一)-创新互联
地址分享:http://6mz.cn/article/dhdgei.html

其他资讯