音频文件分析-- whisper(python 文档解析提取)

使用whisper转文本,这里使用的是large-v3版本

sql 复制代码
pip install git+https://github.com/openai/whisper.git 
python 复制代码
import whisper
import os
from tqdm import tqdm

model = whisper.load_model("large-v3")

path = "rag_data"
for fi in tqdm(os.listdir(path)):
	file = os.path.join(path, fi)
	result = model.transcribe(file)
	text = result["text"]
	with open(os.path.join("rad_all_texts", file.split('.')[0] + ".txt"), 'a') as f:
		f.write(text + '\n')

参考

Introducing Whisper
OpenAI Whisper 新一代语音技术(更新至v3)
fine-tune-whisper
Whisper-Finetune

相关推荐
爱隐身的官人1 小时前
cfshow-web入门-php特性
python·php·ctf
gb42152872 小时前
java中将租户ID包装为JSQLParser的StringValue表达式对象,JSQLParser指的是?
java·开发语言·python
THMAIL2 小时前
量化股票从贫穷到财务自由之路 - 零基础搭建Python量化环境:Anaconda、Jupyter实战指南
linux·人工智能·python·深度学习·机器学习·金融
~-~%%2 小时前
从PyTorch到ONNX:模型部署性能提升
人工智能·pytorch·python
蒋星熠2 小时前
Flutter跨平台工程实践与原理透视:从渲染引擎到高质产物
开发语言·python·算法·flutter·设计模式·性能优化·硬件工程
爬虫程序猿3 小时前
《京东商品详情爬取实战指南》
爬虫·python
胡耀超3 小时前
4、Python面向对象编程与模块化设计
开发语言·python·ai·大模型·conda·anaconda
大佬,救命!!!4 小时前
整理python快速构建数据可视化前端的Dash库
python·信息可视化·学习笔记·dash·记录成长
孔丘闻言4 小时前
python调用mysql
android·python·mysql
Teletele-Lin4 小时前
Miniconda安装与VSCode搭建远程Python、Jupyter开发环境
vscode·python·jupyter·环境配置·远程开发