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

相关推荐
言乐61 分钟前
Python根据关联词搜索模型
开发语言·人工智能·python·机器学习·django
泡海椒3 小时前
JQuick-Excel FORMAT 导出格式实战:日期、金额显示与 TRANSFORM 的边界
前端·python·excel
承渊政道4 小时前
星空组网+Python实战:在另一台电脑上查看CSV报表
运维·开发语言·python·csv·星空组网
LOVE️YOU8 小时前
Python 中 Tuple 为什么有时可 Hash,有时不可 Hash?
开发语言·python·哈希算法
小oo呆9 小时前
【学习心得】迭代器和可迭代对象
开发语言·python
AC赳赳老秦9 小时前
采集行为合规自检:OpenClaw 自动校验 robots 协议与采集频率,规避违规采集风险
java·开发语言·c++·python·php·deepseek·openclaw
迅猛龙办公室9 小时前
Python输出当前计算机的系统日期和时间
开发语言·前端·python
XiaoMaqqqq10 小时前
知名的IP驱动产业新场景新工具
网络·python·网络协议·tcp/ip
言乐611 小时前
Python实现语音审核模型
开发语言·python·django·virtualenv·pygame
程序员清风11 小时前
Python 数据分析环境搭建:从 Jupyter 到 pandas
python·jupyter·数据分析