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

相关推荐
打工仔折腾 AI1 分钟前
260+异构同步链路实战:如何用语义化自动翻译破解CDC DDL同步痛点
人工智能·后端·python·自然语言处理·性能优化·langchain·机器翻译
曲径海盗16 分钟前
【Python 学习第 33 天】条件判断 if/else
python·学习笔记·编程入门
把我格子衫拿来39 分钟前
鼠标点到哪里才算选中?Qt 与 VTK 的拾取坐标、DPI 与体素定位
python·qt·vtk·坐标变换·三维交互
泡茶喝茶写代码1 小时前
A股量化策略回测实战:从行情数据到绩效评估(第 1 篇):回测引擎从零搭建
java·python·股票数据api·股票数据api接口·股票api数据接口·股票量化数据api·股票量化数据接口
RobinDevNotes1 小时前
SGLang 上手:重复的前缀只算一次
人工智能·python·深度学习·sglang·c4python
zyseo82 小时前
谷歌SEO 内链地图脚本:Python 画出权重分发,揪出孤岛页
java·前端·python
破无差2 小时前
精武会徽turtle实现
python
y = xⁿ2 小时前
拆解cloud code记忆系统
java·人工智能·python·github
zzu123zsw2 小时前
打破单模型幻觉与信息茧房:24k Star 开源 BettaFish 的多智能体辩论拓扑与实时舆情研判实战
python
csdn_zhangchunfeng2 小时前
linux 如何安装rst2man命令
开发语言·chrome·python