当前位置:AIGC资讯 > AIGC > 正文

OpenAI Whisper探索(一)

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/0

更新时间 2023-12-31