whisper get_writer srt_writer 参数说明

python 复制代码
lang="en"
constVideo = VideoConst("GV9AMT")
combineMp3Path = constVideo.getCombineMp3Path(lang)
srtPath = constVideo.getOutSrtAsrFixPath(lang=lang)
result, json_object = utilTts.whisper_transcribe_en(combineMp3Path)
srt_writer = get_writer("srt", constVideo.videoDir)
srt_writer(result, srtPath)

max_line_width

the maximum number of characters in a line before breaking the line

换行前一行中的最大字符数

max_line_count

the maximum number of lines in a segment

分段中的最大行数

highlight_words

underline each word as it is spoken in srt and vtt

在srt和vtt中说出的每个单词下面加下划线

max_words_per_line

no effect with --max_line_width) the maximum number of words in a segment

--max_line_width 有值是,max_words_per_line无效。 行中的最大单词数

参考:

How to Customize Subtitles with Whisper - CodePull

https://github.com/openai/whisper

相关推荐
老胖闲聊6 小时前
Python Copilot【代码辅助工具】 简介
开发语言·python·copilot
Blossom.1186 小时前
使用Python和Scikit-Learn实现机器学习模型调优
开发语言·人工智能·python·深度学习·目标检测·机器学习·scikit-learn
曹勖之6 小时前
基于ROS2,撰写python脚本,根据给定的舵-桨动力学模型实现动力学更新
开发语言·python·机器人·ros2
coding随想7 小时前
JavaScript ES6 解构:优雅提取数据的艺术
前端·javascript·es6
小小小小宇7 小时前
一个小小的柯里化函数
前端
lyaihao7 小时前
使用python实现奔跑的线条效果
python·绘图
灵感__idea7 小时前
JavaScript高级程序设计(第5版):无处不在的集合
前端·javascript·程序员
小小小小宇7 小时前
前端双Token机制无感刷新
前端
小小小小宇7 小时前
重提React闭包陷阱
前端
小小小小宇7 小时前
前端XSS和CSRF以及CSP
前端