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

相关推荐
岱宗夫up3 分钟前
基于OpenCode搭建Skills环境
python·低代码·ai编程
-To be number.wan4 分钟前
用 Pandas 分析自行车租赁数据:从时间序列到天气影响的完整实训
python·数据分析·pandas·数据可视化
Coding茶水间41 分钟前
基于深度学习的番茄叶子病虫害监测系统演示与介绍(YOLOv12/v11/v8/v5模型+Pyqt5界面+训练代码+数据集)
图像处理·人工智能·python·深度学习·yolo·目标检测
尘缘浮梦1 小时前
协程asyncio入门案例 1
开发语言·python
没有bug.的程序员1 小时前
Lombok 深度进阶:编译期增强内核、@Data 与 @Builder 逻辑博弈及工业级避坑实战指南
java·开发语言·python·builder·lombok·data·编译器增强
thorn_r1 小时前
RAG系统练手与思考
人工智能·python·机器学习·ai·自然语言处理
IRevers2 小时前
【YOLO】YOLO-Master 腾讯轻量级YOLO架构超越YOLO-13(含检测和分割推理)
图像处理·人工智能·pytorch·python·yolo·transformer·边缘计算
橙露2 小时前
Python 异步爬虫进阶:协程 + 代理池高效爬取实战
开发语言·爬虫·python
一切尽在,你来3 小时前
AI 大模型应用开发前置知识:Python 泛型编程全教程
开发语言·人工智能·python·ai编程
小雨中_4 小时前
3.1 RLHF:基于人类反馈的强化学习
人工智能·python·深度学习·算法·动态规划