音频文件分析-- 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

相关推荐
学习指针路上的小学渣9 分钟前
Selenium笔记
python·selenium
SunnyDays101114 分钟前
使用 Python 在 Excel 中应用数据验证:详细指南
python·excel·数据验证
Jelena1577958579218 分钟前
1688.item_get_app接口:包装尺寸重量信息深度解析
开发语言·前端·python
用户83562907805125 分钟前
使用 Python 精准控制 Word 段落格式
后端·python
NULIWEIMENXIANG26 分钟前
ArcPy 程序调用 QGIS 进程实现几何拓扑检查
python·arcgis·gis
rookie软工29 分钟前
Qt代理委托实现
开发语言·python·qt
love530love33 分钟前
Windows 本地部署 IDM-VTON 虚拟试衣:排障版教程
人工智能·windows·python·virtual try-on
忘忧记35 分钟前
pytest进阶参数化用法
前端·python·pytest
JavaWeb学起来42 分钟前
Python学习教程(二)字符串
开发语言·python·python基础
归寻太乙1 小时前
2026年03月27日—Python基础—Python背景知识与环境搭建
开发语言·python