20240126请问在ubuntu20.04.6下让GTX1080显卡让whisper工作在large模式下?

news2024/9/30 13:29:00

20240126请问在ubuntu20.04.6下让GTX1080显卡让whisper工作在large模式下?
2024/1/26 21:19

问GTX1080模式使用large该如何配置呢?
这个问题没有完成,可能需要使用使用显存更大的显卡了!
比如GTX1080Ti 11GB,更猛的可以选择:RTX2080TI 22GB了!

以下四种large模式都异常了!
large
large-v1
large-v2
large-v3


rootroot@rootroot-X99-Turbo:~$ 
rootroot@rootroot-X99-Turbo:~$ watch -n 2 nvidia-smi
rootroot@rootroot-X99-Turbo:~$ whereis whisper
whisper: /home/rootroot/.local/bin/whisper

rootroot@rootroot-X99-Turbo:~$ 

root@rootroot-X99-Turbo:/# 
root@rootroot-X99-Turbo:/# find . -name whisper
./usr/lib/x86_64-linux-gnu/espeak-ng-data/voices/!v/whisper
./home/rootroot/.cache/whisper
./home/rootroot/.local/bin/whisper
./home/rootroot/.local/lib/python3.8/site-packages/whisper
./home/rootroot/3TB/76Android11.0/out3/.path/whisper
./home/rootroot/3TB/76Android11.0/out/.path/whisper
find: ‘./run/user/1000/gvfs’: Permission denied
root@rootroot-X99-Turbo:/# 
root@rootroot-X99-Turbo:/# whereis whisper
whisper:
root@rootroot-X99-Turbo:/# 
root@rootroot-X99-Turbo:/# 


https://www.bilibili.com/read/cv29388784/?jump_opus=1
【教程】利用whisper模型自动生成英文粗字幕

运行环境
硬件
NVIDIA GeForce 3090 GPU with 24GB VRAM

该模型理论上也能在CPU环境下运行,但极慢。GPU运行也需要占用较大显存。官方提供了多种规模的变体,所需显存从1GB-10GB不等(如下图)

软件
Ubuntu 18.04

理论上来说Windows和MacOS也是支持的,不过我没有尝试过

PyTorch 1.11.1

官方说的是在1.10.1上训练的,不过这个影响不大

操作步骤
克隆项目仓库 git clone https://github.com/openai/whisper.git
从源码安装Python包 pip install .
命令行使用 whisper audio.aac --model large-v3 --device cuda
whisper chs.mp4 --model large-v3 --device cuda

rootroot@rootroot-X99-Turbo:~/chs/large$ whisper chs.mp4 --model large-v3 --device cuda
Traceback (most recent call last):
  File "/home/rootroot/.local/bin/whisper", line 31, in <module>
    sys.exit(cli())
  File "/home/rootroot/.local/lib/python3.8/site-packages/whisper/transcribe.py", line 458, in cli
    model = load_model(model_name, device=device, download_root=model_dir)
  File "/home/rootroot/.local/lib/python3.8/site-packages/whisper/__init__.py", line 156, in load_model
    return model.to(device)
  File "/home/rootroot/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1160, in to
    return self._apply(convert)
  File "/home/rootroot/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 810, in _apply
    module._apply(fn)
  File "/home/rootroot/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 810, in _apply
    module._apply(fn)
  File "/home/rootroot/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 810, in _apply
    module._apply(fn)
  [Previous line repeated 2 more times]
  File "/home/rootroot/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 833, in _apply
    param_applied = fn(param)
  File "/home/rootroot/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1158, in convert

    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB. GPU 0 has a total capacty of 7.92 GiB of which 22.75 MiB is free. Including non-PyTorch memory, this process has 7.54 GiB memory in use. Of the allocated memory 7.09 GiB is allocated by PyTorch, and 351.95 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory
Management and PYTORCH_CUDA_ALLOC_CONF
rootroot@rootroot-X99-Turbo:~/chs/large$ 
rootroot@rootroot-X99-Turbo:~/chs/large$ 


https://www.bilibili.com/read/cv27732514/
OpenAI 发布新版开源语音识别模型 whisper-large-v3


https://zhuanlan.zhihu.com/p/618140077
ChatGPT开源的whisper音频生成字幕,可本地搭建环境运行,效果质量很棒

Model = 'large-v2' #@param ['tiny.en', 'tiny', 'base.en', 'base', 'small.en', 'small', 'medium.en', 'medium', 'large', 'large-v2']

https://blog.csdn.net/lusing/article/details/132032965
2023年的深度学习入门指南(24) - 处理音频的大模型 OpenAI Whisper

我们还可以用model参数来选择模型,比如有10GB以上显存就可以选择使用large模型:
whisper va2.mp3 --model large --language Chinese
默认是small模型。还可以选择tiny, base, medium, large-v1和large-v2.

百度:UBUNTU 显存占用
https://www.bmabk.com/index.php/post/162904.html
Ubuntu显卡占用情况实时监控

每隔2s刷新一次内存使用情况
watch -n 2 free -m
watch -n 1 free -m
watch -n 0.5 free -m


https://blog.csdn.net/weixin_44554475/article/details/102909308
ubuntu实时显示网速cpu占用和内存占用率

1、ubuntu实时显示网速cpu占用率和内存占用率参考博客:
https://www.cnblogs.com/hjw1/p/7901048.html

2、ubuntu实时显示显存使用率:
此处的2表示没2秒显示一次显存情况

watch -n 2 nvidia-smi

3、安装htop查看内存情况:
安装:sudo apt-get install htop
启动: htop

4 ubuntu config clash for windows
https://hiif.ong/clash


https://blog.csdn.net/N1CROWN/article/details/122662706?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0-122662706-blog-102909308.235^v43^pc_blog_bottom_relevance_base1&spm=1001.2101.3001.4242.1&utm_relevant_index=3
Ubuntu16.04 标题栏显示实时网速、CPU使用率

sudo apt-get install python3-psutil curl git gir1.2-appindicator3-0.1

cd indicator-sysmonitor
sudo make install
nohup indicator-sysmonitor &


https://www.toutiao.com/article/7315080543987597864/?app=news_article&timestamp=1706252345&use_new_style=1&req_id=2024012614590561ABBE53940F817BA3B3&group_id=7315080543987597864&tt_from=mobile_qq&utm_source=mobile_qq&utm_medium=toutiao_android&utm_campaign=client_share&share_token=e7d4aa95-92fe-45b6-9dc3-6570888672ab&source=m_redirect
Distil Whisper开源,语音识别比Whisper更快更小更准

https://blog.csdn.net/zcxey2911/article/details/134202112?spm=1001.2101.3001.4242.3&utm_medium=distribute.wap_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-4-134202112-blog-130588477.237%5Ev3%5Ewap_relevant_t0_download&share_token=70d15c8b-cc0b-4ca6-8e5b-31a19ce3c062
持续进化,快速转录,Faster-Whisper对视频进行双语字幕转录实践(Python3.10)


https://blog.csdn.net/qq_48424581/article/details/134113540?share_token=53aba00d-104f-4b3b-be19-4da75f7897d7
3.6 模型的选择,参考如下
_MODELS = {
    "tiny.en": "https://openaipublic.azureedge.net/main/whisper/models/d3dd57d32accea0b295c96e26691aa14d8822fac7d9d27d5dc00b4ca2826dd03/tiny.en.pt",
    "tiny": "https://openaipublic.azureedge.net/main/whisper/models/65147644a518d12f04e32d6f3b26facc3f8dd46e5390956a9424a650c0ce22b9/tiny.pt",
    "base.en": "https://openaipublic.azureedge.net/main/whisper/models/25a8566e1d0c1e2231d1c762132cd20e0f96a85d16145c3a00adf5d1ac670ead/base.en.pt",
    "base": "https://openaipublic.azureedge.net/main/whisper/models/ed3a0b6b1c0edf879ad9b11b1af5a0e6ab5db9205f891f668f8b0e6c6326e34e/base.pt",
    "small.en": "https://openaipublic.azureedge.net/main/whisper/models/f953ad0fd29cacd07d5a9eda5624af0f6bcf2258be67c92b79389873d91e0872/small.en.pt",
    "small": "https://openaipublic.azureedge.net/main/whisper/models/9ecf779972d90ba49c06d968637d720dd632c55bbf19d441fb42bf17a411e794/small.pt",
    "medium.en": "https://openaipublic.azureedge.net/main/whisper/models/d7440d1dc186f76616474e0ff0b3b6b879abc9d1a4926b7adfa41db2d497ab4f/medium.en.pt",
    "medium": "https://openaipublic.azureedge.net/main/whisper/models/345ae4da62f9b3d59415adc60127b97c714f32e89e936602e85993674d08dcb1/medium.pt",
    "large-v1": "https://openaipublic.azureedge.net/main/whisper/models/e4b87e7e0bf463eb8e6956e646f1e277e901512310def2c24bf0e11bd3c28e9a/large-v1.pt",
    "large-v2": "https://openaipublic.azureedge.net/main/whisper/models/81f7c96c852ee8fc832187b0132e569d6c3065a3252ed18e56effd0b6a73e524/large-v2.pt",
    "large": "https://openaipublic.azureedge.net/main/whisper/models/81f7c96c852ee8fc832187b0132e569d6c3065a3252ed18e56effd0b6a73e524/large-v2.pt",
}


https://www.bilibili.com/read/cv20881630/
免费离线语音识别神器whisper安装教程

补充说明:上图中CUDA 11.6和CUDA 11.7都是gpu版本的软件,我一开始下载的也是gpu版本的,但是因为我的电脑显卡的显存比较低,运行whisper模型的时候大模型运行不了。下图是whisper官方给出的运行模型所需显存。

我的显存是4GB,一旦使用whisper运行small模式以上的模型就会报显存不足的错误。为了能运行更大的模型以保证语音识别较高的准确率,我最终只能选择安装cpu版本。 作者:1590856 https://www.bilibili.com/read/cv20881630/ 出处:bilibili

当然还有其他的模型可供选择,可以在命令行运行whisper --help查看帮助。有以下11种模式可供选择。

[--model {tiny.en,tiny,base.en,base,small.en,small,medium.en,medium,large-v1,large-v2,large}] 作者:1590856 https://www.bilibili.com/read/cv20881630/ 出处:bilibili

https://blog.csdn.net/nikolay/article/details/128951413?share_token=92623f2c-9ed4-483e-9c79-8fcf83f08221
使用openai-whisper 语音转文字

使用CUDA
执行如下指令,安装带cuda 的pytorch

pip uninstall torch
pip cache purge
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
--device cuda 使用device参数 指定 cuda

whisper 屋顶.mp3 --language zh --model small --device cuda --initial_prompt "以下是普通话的句子。"

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1413614.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

hex 尽然可以 设置透明度,透明度参数对比图 已解决

还不知道CSS Color Module Level 4标准早在2014年就推出8位hex和4位hex来支持设置alpha值&#xff0c;以实现hex和rgba的互转。这个办法可比6位HEX转RGBA简洁多了&#xff0c;先来简单解释一下&#xff1a; 8位hex是在6位hex基础上加后两位来表示alpha值&#xff0c;00表示完全…

计算机网络——TCP协议

&#x1f4a1;TCP的可靠不在于它是否可以把数据100%传输过去&#xff0c;而是 1.发送方发去数据后&#xff0c;可以知道接收方是否收到数据&#xff1b;2.如果接收方没收到&#xff0c;可以有补救手段&#xff1b; 图1.TCP组成图 TCP的可靠性是付出代价的&#xff0c;即传输效率…

gitee仓库使用中的警告

当 Git 执行 git pull 命令时&#xff0c;有时候会出现类似下面的警告信息&#xff1a; warning: ----------------- SECURITY WARNING ---------------- warning: | TLS certificate verification has been disabled! | warning: ------------------------------------------…

光耦固态继电器在军工行业的全面应用分析

光耦固态继电器是一种集成了光耦隔离和固态继电器功能于一体的电子元件。它通过光电耦合技术实现输入和输出之间的电气隔离&#xff0c;同时利用固态开关控制输出电流。在军工行业&#xff0c;这一技术的应用正在逐渐得到广泛认可。 光耦固态继电器在军工设备中的电气隔离应用 …

FFMPEG解析ts流

三篇相关联的文章&#xff1a; ffmpeg下HLS解析过程-CSDN博客TS文件格式详解及解封装过程-CSDN博客 FFMPEG解析ts流-CSDN博客 一、简介 关于TS格式解析&#xff0c;可以参考《TS文件格式详解及解封装过程-CSDN博客》&#xff0c;本文主要代码部分解读。建议大家熟读iso138…

企业职能部门员工忙闲不均,如何调动积极性?

案例企业背景&#xff1a; 某企业隶属于中国航天科技集团公司&#xff0c;致力于光纤陀螺系统、微机电惯性系统、光纤传感系统等高新技术产品的研发。公司具有雄厚的新型惯导和光电传感技术基础&#xff0c;多年来开创了我国光纤陀螺技术在武器、卫星和载人飞船等多个任务上的…

深入浅出 diffusion(4):pytorch 实现简单 diffusion

1. 训练和采样流程 2. 无条件实现 import torch, time, os import numpy as np import torch.nn as nn import torch.optim as optim from torchvision.datasets import MNIST from torchvision import transforms from torch.utils.data import DataLoader from torchvision.…

Flink 集成 Debezium Confluent Avro ( format=debezium-avro-confluent )

博主历时三年精心创作的《大数据平台架构与原型实现:数据中台建设实战》一书现已由知名IT图书品牌电子工业出版社博文视点出版发行,点击《重磅推荐:建大数据平台太难了!给我发个工程原型吧!》了解图书详情,京东购书链接:https://item.jd.com/12677623.html,扫描左侧二维…

Hadoop-MapReduce-MRAppMaster启动篇

一、源码下载 下面是hadoop官方源码下载地址&#xff0c;我下载的是hadoop-3.2.4&#xff0c;那就一起来看下吧 Index of /dist/hadoop/core 二、上下文 在上一篇<Hadoop-MapReduce-源码跟读-客户端篇>中已经将到&#xff1a;作业提交到ResourceManager&#xff0c;那…

Bitbucket第一次代码仓库创建/提交/创建新分支/合并分支/忽略ignore

1. 首先要在bitbucket上创建一个项目&#xff0c;这个我没有权限创建&#xff0c;是找的管理员创建的。 管理员创建之后&#xff0c;这个项目给了我权限&#xff0c;我就可以创建我的代码仓库了。 2. 点击这个Projects下的具体项目名字&#xff0c;就会进入这样一个页面&#…

EG-2121CA (晶体振荡器 低抖动表面声波(SAW)振荡器)

在当今高度数字化的时代&#xff0c;稳定的信号传输显得尤为重要。若要实现信号的稳定传输&#xff0c;晶体振荡器必不可少。EG-2121CA&#xff0c;它是一款低抖动表面声波&#xff08;SAW&#xff09;振荡器设计的产品&#xff0c;凭借其出色的频率范围、稳定的电源电压和可靠…

网络安全全栈培训笔记(58-服务攻防-应用协议设备KibanaZabbix远控向日葵VNCTV)

第58天 服务攻防-应用协议&设备Kibana&Zabbix&远控向日葵&VNC&TV 知识点&#xff1a; 1、远程控制第三方应用安全 2、三方应用-向日葵&VNC&TV 3、设备平台-Zabbix&Kibanai漏洞 章节内容&#xff1a; 常见版务应用的安全测试&#xff1a; 1…

甲基四嗪-PEG4-叠氮,Methyltetrazine PEG4 azide,可以作为连接各种生物分子的桥梁

您好&#xff0c;欢迎来到新研之家 文章关键词&#xff1a;甲基四嗪-四聚乙二醇-叠氮&#xff0c;甲基四嗪-PEG4-叠氮&#xff0c;Methyltetrazine PEG4 azide &#xff0c;Methyltetrazine PEG4 N3 一、基本信息 产品简介&#xff1a;Methyltetrazine PEG4 azide is a comp…

简单记录一下如何安装python以及pycharm(图文教程)(可供福建专升本理工类同学使用)

本教程主要给不懂计算机的或者刚刚开始学习python的同学&#xff08;福建专升本理工类&#xff09;&网友学习使用&#xff0c;基础操作&#xff0c;比较详细&#xff0c;其他问题等待补充&#xff01; 安装Python 1.进入python官网&#xff08;https://www.python.org/&a…

10.Golang中的map

目录 概述map实践map声明代码 map使用代码 结束 概述 map实践 map声明 代码 package mainimport ("fmt" )func main() {// 声明方式1var map1 map[string]stringif map1 nil {fmt.Println("map1为空")}// 没有分配空间&#xff0c;是不能使用的// map…

关于在微信小程序中使用taro + react-hook后销毁函数无法执行的问题

问题&#xff1a; 在 taro中使用navigageTo() 跳转路由后hook中useEffect 的return函数没有执行 没有执行return函数 框架版本&#xff1a; tarojs: 3.6 react: 18.0 原因&#xff1a; 使用navigateTo() 跳转路由的话并不会销毁页面和组件&#xff0c;会加入一…

携程开源 基于真实请求与数据的流量回放测试平台、自动化接口测试平台AREX

携程开源 基于真实请求与数据的流量回放测试平台、自动化接口测试平台AREX 官网文档 基于真实请求与数据的流量回放测试平台、自动化接口测试平台AREX 这篇文章稍稍水一下&#xff0c;主要讲下部署过程里踩的坑&#xff0c;因为部署的过程主要是运维同学去处理了&#xff0c;我…

【Java与网络3】Java网络编程之初体验

我们平时极少使用Java来直接写网络通信相关的程序&#xff0c;一般都使用Tomcat Web服务或者Netty等框架来帮助我们做&#xff0c;不过呢&#xff0c;要想将技术学到家&#xff0c;我们研究一下基本的网络编程还是非常必要的&#xff0c;这样可以让我们将很多内容融会贯通&…

把批量M3U8网络视频地址转为MP4视频

在数字媒体时代&#xff0c;视频格式的转换已成为一项常见的需求。尤其对于那些经常处理网络视频的用户来说&#xff0c;将M3U8格式的视频转换为更常见的MP4格式是一项必备技能。幸运的是&#xff0c;现在有了固乔剪辑助手这款强大的工具&#xff0c;这一过程变得异常简单。下面…

单片机学习笔记---矩阵键盘

目录 矩阵键盘的介绍 独立按键和矩阵按键的相同之处&#xff1a; 矩阵按键的扫描 代码演示 代码模块化移植 Keil自定义模板步骤&#xff1a; 代码编写 矩阵键盘就是开发板上右下角的这个模块 这一节的代码是基于上一节讲的LCD1602液晶显示屏驱动代码进行的 矩阵键盘的介…