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

相关推荐
Xiu Yan4 分钟前
Python 数据分析:数据分析步骤
开发语言·python·数据分析
vilya4 分钟前
把 Python 塞进 APK:Chaquopy 打包实践
android·python
黑妹天下第一乖13 分钟前
小智改造实战解读-用kokoro-onnx替换云端 TTS 的完整记录
大数据·开发语言·人工智能·python·交互
papaofdoudou42 分钟前
从抽象群到可计算的矩阵:S₃ 的表示论与共轭视角
python·决策树·矩阵
JWASX1 小时前
【agent 开发】Agent 智能体
大数据·人工智能·python
智购科技无人售货机工厂店1 小时前
玻璃瓶饮料破损率突然上升,排查发现是取货口缓冲垫老化了~YH
java·开发语言·人工智能·python·eclipse
JWASX2 小时前
【agent 开发】agent 开发学习 - LangChain(2)
python·学习·langchain
kimnoic2 小时前
Python常用标准库模块及查询使用方法
开发语言·python
范中勤2 小时前
Python 与 Java:模块、包、对象、反射核心差异总结
java·python·面试·反射·元类
I Am a robert girl2 小时前
HelixWorld 源码剖析:当世界模型第一次“开口说话”
python·多模态·扩散模型·世界模型·自回归·空间音频·流式推理