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

相关推荐
数据知道14 分钟前
claw-code 源码分析:大型移植的测试哲学——如何用 unittest 门禁守住「诚实未完成」的口碑?
开发语言·python·ai·claude code·claw code
炸炸鱼.22 分钟前
Python 网络编程入门(简易版)
网络·python
技术小黑23 分钟前
TensorFlow学习系列10 | 数据增强
python·深度学习·tensorflow2
万粉变现经纪人26 分钟前
如何解决 import aiohttp ModuleNotFoundError: No module named ‘aiohttp’
python·scrapy·beautifulsoup·aigc·pillow·pip·httpx
AC赳赳老秦30 分钟前
OpenClaw image-processing技能实操:批量抠图、图片尺寸调整,适配办公需求
开发语言·前端·人工智能·python·深度学习·机器学习·openclaw
diving deep37 分钟前
从零构建大模型--实操--搭建python环境
开发语言·python
qq_白羊座1 小时前
Langchain、Cursor、python的关系
开发语言·python·langchain
小陈的进阶之路1 小时前
接口Mock测试
python·mock
kiku18181 小时前
Python网络编程
开发语言·网络·python
zncxCOS1 小时前
【ETestDEV5教程30】ICD操作之信号组操作
python·测试工具·测试用例·集成测试