CentOS 安装 OpenAI Whisper
时间: 2023-02-09 13:24:05 浏览: 564
首先,请确保你的CentOS系统已经更新到最新版本。
1. 安装 pip: 使用命令 "yum install python3-pip" 安装 pip。
2. 安装 Whisper: 使用命令 "pip3 install whisper" 安装 Whisper。
3. 配置 Whisper: 使用命令 "whisper configure" 进行配置。
4. 开始使用: 使用命令 "whisper" 开始使用 Whisper。
注意: 这些步骤需要使用管理员权限。如果碰到权限问题,请在命令前加上 "sudo"。
相关问题
CentOS 安装并配置 OpenAI Whisper 识别中文
1. 首先需要在 CentOS 上安装 Python3 和 pip3。
2. 使用 pip3 安装 OpenAI Whisper:
```
pip3 install openai-whisper
```
3. 在使用之前,需要设置 OpenAI API key:
```
export OPENAI_API_KEY="your_api_key"
```
4. 现在可以使用 Whisper 识别中文了,例如:
```
import openai_secret_manager
assert "openai" in openai_secret_manager.get_services()
secrets = openai_secret_manager.get_secrets("openai")
print(secrets)
import openai
openai.api_key = secrets["api_key"]
prompt = (f"Translate English to Chinese: I am a student.")
completions = openai.Completion.create(
engine="text-davinci-002",
prompt=prompt,
max_tokens=1024,
n=1,
stop=None,
temperature=0.5,
)
message = completions.choices[0].text
print(message)
```
请确保你有足够的API请求配额,否则会出现错误。
阅读全文
相关推荐





