[Share Experiences] deepin终端部署openAI whisper用于提取音视频字幕
Tofloor
poster avatar
qq4945286
deepin
2023-06-14 00:20
Author

演示视频

https://www.bilibili.com/video/BV1uo4y1N7Um/?spm_id_from=333.999.0.0

文字说明

deepin终端部署openAI whisper

网址:https://github.com/openai/whisper

安装ffmpeg 终端输入sudo apt install ffmpeg

安装python 因为deepin系统已经安装了python3.10这里就不用安装了

先设置一下路径 在终端输入
echo 'export PATH=/home/xiaohu/.local/bin:$PATH' >>~/.bashrc

把xiaohu换成你自己的用户名

source ~/.bashrc

安装pip 终端输入sudo apt install python3-pip

安装pytorch

https://pytorch.org/get-started/locally/

安装openai-whisper

pip install -U openai-whisper (如果这样安装会比较慢)

python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -U openai-whisper

到这一步,在终端部署openai-whisper就完成了

接着就是使用

whisper 音视频文件 --model 模型类型

例如:whisper 01.mp4 --model large

whisper 音视频文件 --model 模型类型--task translate(把别的语音翻译成英文字幕)

第一次使用会比较慢,因为要下载模型,模型存放在/home/xiaohu/.cache/whisper

Reply Favorite View the author
All Replies
阿尼樱奈奈
Moderator
2023-06-14 00:21
#1

applaud

Reply View the author
Merlin
Super Moderator
Product Manager
2023-06-14 00:23
#2

看起来很棒!

Reply View the author
晚秋(lateautumn)
Moderator
2023-06-14 00:32
#3

对我这个“大白”来说,感觉太难了,但谢谢分享。kissing_heart

Reply View the author
晚秋(lateautumn)
Moderator
2023-06-14 00:35
#4

“安装python 因为deepin系统已经安装了python3.10这里就不用安装了“,系统预装了,在启动器里我怎么没找到?

Reply View the author
阿尼樱奈奈
Moderator
2023-06-14 00:43
#5
晚秋(lateautumn)

“安装python 因为deepin系统已经安装了python3.10这里就不用安装了“,系统预装了,在启动器里我怎么没找到?

python在启动器里是找不到的。

Reply View the author
青稚°
Moderator
2023-06-14 01:08
#6

点赞了like

Reply View the author
babyfengfjx
Super Moderator
CQA
2023-06-14 01:09
#7

跑起来就不错agree

这个对电脑性能还是有一定要求,前些时候试了一把,只有大模型才能满足我们的转换需求,然而转换的时间实在是太长了,小模型准确率又不够,真正日常使用还是放弃了,直接用在线工具效率更高一些。

可能条件好的可以自己跑一跑~

Reply View the author
qq4945286
deepin
2023-06-14 02:28
#8
晚秋(lateautumn)

“安装python 因为deepin系统已经安装了python3.10这里就不用安装了“,系统预装了,在启动器里我怎么没找到?

终端python3

Reply View the author
qq4945286
deepin
2023-06-14 02:28
#9
阿尼樱奈奈

python在启动器里是找不到的。

终端要输入

python3

Reply View the author
qq4945286
deepin
2023-06-14 02:30
#10
babyfengfjx

跑起来就不错agree

这个对电脑性能还是有一定要求,前些时候试了一把,只有大模型才能满足我们的转换需求,然而转换的时间实在是太长了,小模型准确率又不够,真正日常使用还是放弃了,直接用在线工具效率更高一些。

可能条件好的可以自己跑一跑~

N卡要显卡10G的跑大模型,我的A卡只能用cpu

Reply View the author