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

相关推荐
Darkershadow1 小时前
python学习之串口通信
python·学习
3824278272 小时前
python:输出JSON
前端·python·json
也许是_3 小时前
大模型应用技术之 详解 MCP 原理
人工智能·python
沙漠豪3 小时前
提取PDF发票信息的Python脚本
开发语言·python·pdf
F_D_Z5 小时前
【Python】家庭用电数据的时序分析
python·数据分析·时序分析·序列分解
a程序小傲5 小时前
蚂蚁Java面试被问:注解的工作原理及如何自定义注解
java·开发语言·python·面试
love530love5 小时前
【笔记】ComfyUI “OSError: [WinError 38] 已到文件结尾” 报错解决方案
人工智能·windows·python·aigc·comfyui·winerror 38
lcreek5 小时前
LeetCode215. 数组中的第K个最大元素、LeetCode912. 排序数组
python·算法·leetcode
cqbzcsq5 小时前
蛋白质功能预测模型DAMPE论文阅读报告
论文阅读·人工智能·python·深度学习·生物信息学