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

相关推荐
小CC吃豆子40 分钟前
Python爬虫
开发语言·python
June bug1 小时前
(#字符串处理)字符串中第一个不重复的字母
python·leetcode·面试·职场和发展·跳槽
lixzest2 小时前
PyTorch基础知识简述
人工智能·pytorch·python
飞Link2 小时前
深度学习里程碑:ResNet(残差网络)从理论到实战全解析
人工智能·python·深度学习
ASS-ASH2 小时前
霸王色霸气的本质概括分析
人工智能·python·机器学习·大脑·脑电波
ValidationExpression2 小时前
学习:词嵌入(Word Embedding / Text Embedding)技术
python·学习·ai
liliangcsdn2 小时前
如何使用lambda对python列表进行排序
开发语言·python
葱明撅腚3 小时前
seaborn绘图(下)
python·matplotlib·可视化·seaborn·图表绘制
半路_出家ren3 小时前
3.python模拟勒索病毒
python·网络安全·密码学·网络攻击模型·base64·病毒·勒索病毒
jhf20203 小时前
2026汽车4S店GEO优化高性价比公司选型指南:从效果、成本到适配
python·汽车