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

相关推荐
鸡鸭扣1 小时前
Docker:3、在VSCode上安装并运行python程序或JavaScript程序
运维·vscode·python·docker·容器·js
paterWang2 小时前
基于 Python 和 OpenCV 的酒店客房入侵检测系统设计与实现
开发语言·python·opencv
东方佑2 小时前
使用Python和OpenCV实现图像像素压缩与解压
开发语言·python·opencv
神秘_博士2 小时前
自制AirTag,支持安卓/鸿蒙/PC/Home Assistant,无需拥有iPhone
arm开发·python·物联网·flutter·docker·gitee
Moutai码农4 小时前
机器学习-生命周期
人工智能·python·机器学习·数据挖掘
小白教程4 小时前
python学习笔记,python处理 Excel、Word、PPT 以及邮件自动化办公
python·python学习·python安装
武陵悭臾5 小时前
网络爬虫学习:借助DeepSeek完善爬虫软件,实现模拟鼠标右键点击,将链接另存为本地文件
python·selenium·网络爬虫·pyautogui·deepseek·鼠标右键模拟·保存链接为htm
代码猪猪傻瓜coding5 小时前
关于 形状信息提取的说明
人工智能·python·深度学习
码界筑梦坊6 小时前
基于Flask的第七次人口普查数据分析系统的设计与实现
后端·python·信息可视化·flask·毕业设计
微笑的Java7 小时前
Python - 爬虫利器 - BeautifulSoup4常用 API
开发语言·爬虫·python