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

相关推荐
ney187819024741 小时前
分类网络LeNet + FashionMNIST 准确率92.9%
python·深度学习·分类
Data_agent1 小时前
1688获得1688店铺列表API,python请求示例
开发语言·python·算法
2401_871260021 小时前
Java学习笔记(二)面向对象
java·python·学习
2301_764441332 小时前
使用python构建的应急物资代储博弈模型
开发语言·python·算法
喏喏心2 小时前
深度强化学习:价值迭代与Bellman方程实践
人工智能·python·学习·机器学习
小白勇闯网安圈2 小时前
supersqli、web2、fileclude、Web_python_template_injection
python·网络安全·web
用户8356290780513 小时前
从一维到二维:用Spire.XLS轻松将Python列表导出到Excel
后端·python
l木本I3 小时前
uv 技术详解
人工智能·python·深度学习·机器学习·uv
宁大小白3 小时前
pythonstudy Day31
python·机器学习
江上鹤.1484 小时前
Day34模块和库的导入
python