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

相关推荐
kyle~5 分钟前
Python---Flask 轻量级Web框架
开发语言·python·flask
xinhuanjieyi27 分钟前
python获取股票分红
chrome·python·elasticsearch
喵手1 小时前
Python爬虫实战:小红书热门笔记爬虫实战 - 搜索关键词驱动的内容采集指南!
爬虫·python·爬虫实战·零基础python爬虫教学·小红书热门笔记·搜索关键词·采集小红书热门笔记数据
nita张2 小时前
战略定位实战:案例分享与经验总结
大数据·人工智能·python
MadPrinter2 小时前
Python 异步爬虫实战:FindQC 商品数据爬取系统完整教程
爬虫·python·算法·自动化
清水白石0082 小时前
Python 函数式编程实战:从零构建函数组合系统
开发语言·python
喵手3 小时前
Python爬虫实战:数据质量治理实战 - 构建企业级规则引擎与异常检测系统!
爬虫·python·爬虫实战·异常检测·零基础python爬虫教学·数据质量治理·企业级规则引擎
头发够用的程序员3 小时前
Python 魔法方法 vs C++ 运算符重载全方位深度对比
开发语言·c++·python
加成BUFF3 小时前
基于DeepSeek+Python开发软件并打包为exe(VSCode+Anaconda Prompt实操)
vscode·python·prompt·conda·anaconda
52Hz1183 小时前
力扣46.全排列、78.子集、17.电话号码的字母组合
python·leetcode