音频文件分析-- 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 分钟前
数据结构基础:图论基础全面解析
数据结构·python·图论
喵手8 分钟前
Python爬虫实战:城市公交数据采集实战:从多线路分页到结构化站点序列(附CSV导出 + SQLite持久化存储)!
爬虫·python·爬虫实战·零基础python爬虫教学·城市交通数据采集·多线路分页导出csv·sqlite持久化存储
2301_8112329813 分钟前
使用Python进行PDF文件的处理与操作
jvm·数据库·python
深蓝海拓18 分钟前
海康 MV 相机几种Bayer RG像素格式的处理
笔记·python·qt·学习·pyqt
少年强则国强24 分钟前
anaconda安装配置pycharm
ide·python·pycharm
m0_5613596724 分钟前
自动化与脚本
jvm·数据库·python
盐真卿25 分钟前
python第五部分:文件操作
前端·数据库·python
多打代码33 分钟前
2026.1.29 复原ip地址 & 子集 & 子集2
开发语言·python
人工智能AI技术34 分钟前
【Agent从入门到实践】47 与前端系统集成:通过API对接,实现前端交互
人工智能·python
qq_1927798738 分钟前
如何用FastAPI构建高性能的现代API
jvm·数据库·python