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

相关推荐
西洼工作室2 分钟前
B站登录流程全解析:RSA+极验验证
前端·python·极验
zhaoyong2222 分钟前
如何在 MySQL 中实现基于全字段唯一性的重复行计数更新
jvm·数据库·python
X56613 分钟前
为什么宝塔面板网站无法正常连接外部远程数据库_检查服务器安全组放行端口并开启IP授权
jvm·数据库·python
woxihuan1234567 分钟前
C#怎么使用CancellationToken C#如何用取消令牌优雅地取消异步任务和长时间操作【进阶】
jvm·数据库·python
测试员周周14 分钟前
【AI测试功能5】AI功能测试的“黄金数据集“构建指南:从0到1搭建质量评估体系
运维·服务器·开发语言·人工智能·python·功能测试·集成测试
yexuhgu18 分钟前
MySQL主从复制支持跨版本吗_不同版本间同步的注意事项
jvm·数据库·python
好运的阿财21 分钟前
7天没有打开OpenClaw了
python·机器学习·ai·ai编程·openclaw
woxihuan12345623 分钟前
CSS怎样调整弹性项目排列顺序_使用order属性轻松控制DOM显示顺序
jvm·数据库·python
卡次卡次125 分钟前
14.2:详细补充:子进程会复制什么
前端·python·php
谙弆悕博士25 分钟前
【附Python源码】基于决策树的信用卡欺诈检测实战
python·学习·算法·决策树·机器学习·数据分析·scikit-learn