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

相关推荐
搜狐技术产品小编20236 分钟前
端侧Python动态算法策略的部署与运行
开发语言·python
时光书签22 分钟前
了解脚本语言
python·bash·batch命令
ID_1800790547326 分钟前
Python 采集转转二手商品详情:API 接口与爬虫实战全方案(2026 最新)
开发语言·爬虫·python
m0_7471245338 分钟前
LangChain 索引增强对话链详解
python·ai·langchain
智算菩萨39 分钟前
【Pygame】第19章 网络多人游戏基础与局域网联机原理
网络·python·游戏·pygame
MarsBighead1 小时前
VSCode Python 调试故障排查:`justMyCode` 配置项引发的血案
ide·vscode·python
迷藏4941 小时前
**发散创新:基于Python与深度学习的情绪识别实战全流程解析**在人工智能快速发展的今天,**情绪识别(Emoti
java·人工智能·python·深度学习
羊小猪~~1 小时前
LLM--SFT简介
python·考研·算法·ai·大模型·llm·微调
无心水1 小时前
17、Java内存溢出(OOM)避坑指南:三个典型案例深度解析
java·开发语言·后端·python·架构·java.time·java时间处理
susu10830189112 小时前
python代码把GIF 转成视频
开发语言·python